+ 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 Respuestas
+ 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)