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

looking for a man

 I am a mid aged woman.  I was born in 1980. I do not have any kid. no complicated  dating before . I am looking for a man here for marriage...