0

How to print list with even index without loop

list1=[1,2,3,4,5] list2=[6,7,8,9,10,11] list1.extend(list2) list1.remove(11) print(list1) Now I have to print [2,4,6,8,10]

13th May 2020, 5:22 PM
MOHAN CHANDAK
1 Odpowiedź
+ 2
a=[1,2,3,4] print(a[0::2])
13th May 2020, 5:29 PM
Abhay
Abhay - avatar