+ 3
In one-dimensional list a=[a1, a2, ..., an] all positive elements that have an even sequence number, rewrite the beginning....
In one-dimensional list a=[a1, a2, ..., an] all positive elements that have an even sequence number, rewrite the beginning of the list. in Python
1 Réponse
+ 3
a = [a[i] for i in range(0, len(a)) if i % 2 == 0]