ezoic

Sunday, September 8, 2019

reverse a string in python

a="imdelda"
a1=list(a)
for i in range(len(a1)/2):
    tmp=a1[i]
    a1[i]=a1[len(a1)-i-1]
    a1[len(a1)-i-1]=tmp
a2="".join(a1)
print(a2)

No comments:

Post a Comment

R is not a simple programming language, and it does better on reading excel files than python

R is not a simple programming language, and it does better on reading excel files than python . tried to read excel files to python and R. i...