摘要: count 方法 a = ['fdrdr','peng','chenxi','yugfd','wsd','peng'] #定义的列表 b = a.count('peng') #查出peng这个元素,在列表里有几个 print(b,a) 测试 D:\pyth\python.exe D:/python/ 阅读全文
posted @ 2019-11-29 15:21 烟雨楼台,行云流水 阅读(181) 评论(0) 推荐(0) 编辑