Blog Archive

search

Tuesday, August 6, 2019

Write a Python function to insert a string in the position of a string

a = input('Enter a string ')
b = input('enter a string to to insert')
c = int(input('enter a position'))
d=''
d=a[:c]+b+a[c:]
print(d)

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):...