Blog Archive

search

Tuesday, August 6, 2019

Python program to remove the characters which have odd index values of a given string

a = input('Enter a string ')
b=''
i=0
for i in range(len(a)):
    if(i%2==0):
        b = b+a[i]
print(b)

No comments:

Post a Comment

Python program to create a string from two given strings concatenating uncommon characters of the said strings

PROGRAM :  a = input('Enter a string : ') b = input('Enter a string : ') c='' for i in a:     if(i not in b):...