摘要:
name = "my \tname is alex" #\t 空格 1. name.capitalize() #首字母大写 2.name.count('a') # 对字母a计数 3.name.center(50,'-') # 把name 写在中心,不够补齐 4.name.encode('uft-8' 阅读全文
摘要:
举例说明:names = ["zhangyang", "guyun", 'xiangpeng', ['alex','jack'], "xuliangcheng"] print(type(names)) 1. list 切片: extract_name = names[0:3] # 切片 顾头不顾尾 阅读全文