摘要:
Q1:页面显示 序号 + 商品名称 + 商品价格,如: 1 电脑 1999 2 鼠标 10 阅读全文
摘要:
dic2 = {'k1': "v1", "k2": "v2", "k3": [11,22,33]}# for k in dic2.keys():# print(k)## for k in dic2.values():# print(k)# for k,w in dic2.items():# prin 阅读全文
摘要:
# b = st.strip("|") # strip() 只去头尾的,不能去中间 阅读全文
摘要:
with open(r'商品资料','r',encoding='utf-8') as f1: lis_goods = eval(f1.read()) # 用eval似乎会执行结果一次性返回,结果显示的是一行print(lis_goods) 阅读全文
摘要:
s = "55p"" print(s.isdigit()) # False s2 = "5568" print(s2.isdigit()) # True 阅读全文