摘要: __author__ = 'ZHHT' #!/usr/bin/env python # -*- coding:utf-8 -*- #统计字符串中,各个字符的个数 #比如:"hello world" 字符串统计的结果为: h:1 e:1 l:3 o:2 d:1 r:1 w:1 a = "hello world" b = set(a) for i in b: if i == ' ': ... 阅读全文
posted @ 2018-07-23 11:38 赵宏涛 阅读(952) 评论(0) 推荐(0) 编辑