摘要: .capitalize():首字母大写 .count("%s"):统计有多少个%s .center(50,"-"):一共打印50个字符,内容放中间,其余用 - 填充 .endswith(""):以什么作为结尾 .isalnum:是不是阿拉伯数字 .isalpha:是不是英文字母 .isdigit:是 阅读全文
posted @ 2017-12-04 17:42 独食鬼 阅读(102) 评论(0) 推荐(0)
摘要: product_list = [ ("apple",20), ("pen",10), ("water",4), ("phone",4000),]shopping_list=[]salary = input("input your salary:")if salary.isdigit(): 判断输入的 阅读全文
posted @ 2017-12-01 14:47 独食鬼 阅读(96) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2017-11-22 15:38 独食鬼 阅读(1) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2017-10-25 16:24 独食鬼 阅读(12) 评论(0) 推荐(0)