0

fill to take first two elements of the list

list = ["a", "b", "c", "d"] a = list[0 _ _ ]

30th Sep 2017, 10:04 AM
VIPENDRA PAL RAJPUT
VIPENDRA PAL RAJPUT - avatar
3 Answers
+ 2
list = ["a","b","c","d"] a = list[0:2] this is going to return the first two elements
30th Sep 2017, 10:41 AM
Leno
Leno - avatar
0
thnx
30th Sep 2017, 10:42 AM
VIPENDRA PAL RAJPUT
VIPENDRA PAL RAJPUT - avatar
0
list = ["a","b","c","d"] a = list[0:2]
8th May 2022, 11:23 AM
Abdoulaye Hamadoun SAKAYE