str=‘China‘ for i in str: print(i) s=[‘C‘,‘h‘,‘i‘,‘n‘,‘a‘,68] for i in s: print(i) tup=(‘china‘,‘chinese‘,1949,2018) for i in range(len(tup)): print(tup[i]) d={‘c‘:2,‘h‘:3,‘i‘:4} for k,v in d.items(): print(k,v)
总结列表,元组,字典,集合的联系与区别
原文地址:https://www.cnblogs.com/lg916843/p/8622615.html
时间: 2024-11-02 16:25:23