0
Write a program to exchange first half elements of a list with the second half elements of the list
3 odpowiedzi
+ 4
First try to do by yourself.
0
Have a look at list slicing and how you can concatenate lists.
also:-
You can append a popped item... put it in a loop that's loops through half the length of the list, just bare in mind where halfway is if your list has an odd number of elements.
(but..... I'm sure someone's gona come up with a one-liner to do it.)
- 1
Mf