a=input("enter some string::")
print("Character of the even positions",a[::2])
print("Character of the even positions",a[1::2])
print("Character of the even positions",a[::2])
print("Character of the even positions",a[1::2])
output:
enter some string::anil
Character of the even positions ai
Character of the even positions nl
No comments:
Post a Comment