+ 1

Printing only certain amount of items in list on python 3

It's probably a very dumb question to ask but i can't find answer anywhere else. Lets say i have a list [1,2,3,4,5,6,7,8,9] is there any way i can print only 6 items without using index? the answer should be like [1,2,3,4,5,6]

5th Sep 2018, 7:15 PM
Adam Lamber
Adam Lamber - avatar
2 Respostas
5th Sep 2018, 7:19 PM
Louis
Louis - avatar
+ 1
Oooh now i get it, thanks!
5th Sep 2018, 7:49 PM
Adam Lamber
Adam Lamber - avatar