0
Input 2 string and remove first string from second one.
For example 1st input = ab 2nd input= abcdeb Output =cde
4 ответов
+ 1
Use for loop of string1 and replace each matching character of string2 with empty character.
+ 1
string1 = input()
string2=input()
for str in string1:
string2 = string2.replace(str, "")
print(string2)
+ 1
Mehdi Teimouri use one more nested loop to check each character of 2nd string.
0
Adarsh Chaturvedi there is no need for more loop because replace() method itself search the every character of it's first input and replace it with given character