Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
149 B
0
Indexable
Never
def swap(lst):
    for i in range(0, len(lst)-1, 2):
        lst[i], lst[i+1] = lst[i+1], lst[i]

list=eval(input())

swap(list)
print(list)
Leave a Comment