Thursday, 6 June 2019

merge two strings with alternate characters in python3

st="sar"
st1="lax"
ans=''.join(map(''.join, zip(st, st1))) 
print(ans)

No comments:

Post a Comment