+ 1

# a list comprehension cubes = [ for i in range(5) i**3] print(cubes) why is it not possible

4th Jun 2019, 3:00 AM
B!P!N R@j
B!P!N R@j - avatar
2 odpowiedzi
+ 1
It is possible, but with the right syntax. Try: cubes = [ i ** 3 for i in range(5) ]
4th Jun 2019, 3:10 AM
777
777 - avatar
0
cubes = [i**3 for i in range(5)] print(cubes) it is possible when written that way
20th Jul 2022, 9:36 AM
duke writer
duke writer - avatar