+ 1
list slicing prob
how come I cant slice this list whats the correct way to do it? move=['car, bike, helicopter, plane'] print(move) print("Now slicing") move[2:] print(move) It prints either the whole list or just empty []
3 Answers
+ 6
Its because your array consists of only one string âcar, bike, helicopter, planeâ. You should instead do:
move = [âcarâ, âbikeâ, âhelicopterâ, âplaneâ]
Then it should work
+ 1
Ali Zhussupov oh right thx I forgot bout this
0
happy to help)