11 2021 档案
摘要:3、统计列表英文字母的单词个数 d = ["a","uhhj","jlkjn",,"jlkjn"] 方法一: data = list(set(d))dictcount = {}for i in data: dictcount[i]=d.count(i) 方法二: dictcount = {}for
阅读全文
摘要:输入一行非中文字符,分别统计出其中英文字母、空格、数字和其他字符的个数 def countzimu(): dict = {} shuzi = 0 zimu = 0 space = 0 other = 0 str = input("请输入任意字符:") for i in str: if i.isdig
阅读全文
摘要:1、在项目根目录添加config.py def pytest_collection_modifyitems(session,items): print("收集的测试用例:%s"%items) items.sort(key=lambda x:x.name,reverse=True) print("排序
阅读全文