摘要:
samp_string = "Whatever you are, be a good one." for i in samp_string: print(i) for i in range(0,len(samp_string)-2,2): print(samp_string[i]+samp_string[i+1]) print('A=',ord("A")) print('65... 阅读全文
摘要:
# Strings have many methods wo can use rand_string=" life is a beautiful struggle " print("去除左边空格:",rand_string.lstrip()) print("去除右边的空格:",rand_string.rstrip()) print("去除两边的空格:",rand_string.s... 阅读全文
摘要:
格式化对象为字符串:%s 格式化对象为整数:%d 阅读全文