2020-1-8
作者:互联网
>>> numb=list(range(1,6))
>>> print(numb)
[1, 2, 3, 4, 5]
>>> digits=list(range(1,6))
>>> min(digits)
1
>>> max(digits)
5
>>> sum(digits)
15
>>> squares = list( value**2 for value in range (1,10))
>>> print(squares)
[1, 4, 9, 16, 25, 36, 49, 64, 81]
标签:digits,list,value,range,2020,numb,print 来源: https://www.cnblogs.com/flyme2moon/p/12168009.html