Tuesday, October 4, 2016

[ More Types ] List Comprehension

cubes = [i*3 for i in range(5)]
print (cubes)

[0,1,8,27,64]

can also contain if statement

No comments:

Post a Comment