lmao
3 months ago in Plain Text
<body>
def ElScambiator(a):

lista=[]
for i in range(len(a)):
lista.append("")

if len(a)%2!=0:
lista[len(a) - 1] = a[len(a) - 1]

for i in range(len(a)-len(a)%2):

lista[i+(-1)**i]=a[i]


return lista




kek=["ciao","come stai","sono Alfredo","mangio la pasta"]

print(ElScambiator(kek))


<body/>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26