摘要: 1 #元组 是不可变的列表。一但创建后,任何方法都不可以修改元素 2 a_tuple = ("a","b","mpilgrim","z","example") 3 print(a_tuple) 4 print(a_tuple[1]) 5 print(a_tuple[-1]) 6 print(a_tuple[1:3]) 7 8 #元组 同时赋多个值 9 v = ('a',2,T... 阅读全文
posted @ 2019-04-23 21:32 西庇阿 阅读(97) 评论(0) 推荐(0)
摘要: #列表的增、删、改、查 #增加 append li=['Scipio',[1,2,3],'wusir','egon','女神','taibai'] li.append('日天') print(li) ''' #Fraction 函数 ''' ''' x = 0 import fractions x = fractions.Fraction(2,3) print(x) x1=x x1=fract... 阅读全文
posted @ 2019-04-23 20:50 西庇阿 阅读(120) 评论(0) 推荐(0)