Untitled

Anonymous
plain_text
02/15/2024 6:32 AM
200 B
15
Indexable
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)
Editor is loading...
Leave a Comment