Advertisement
PowerCell46

String mutation Python

Dec 23rd, 2022
672
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. first_string = str(input())
  2. second_string = str(input())
  3.  
  4. first_list = []
  5. second_list = []
  6. for index in range(0, len(first_string)):
  7.     first_list.append(first_string[index])
  8.     second_list.append(second_string[index])
  9.  
  10. for xedni in range(0, len(first_string)):
  11.     if first_list[xedni] == second_list[xedni]:
  12.         continue
  13.     else:
  14.         first_list[xedni] = second_list[xedni]
  15.         print(*first_list, sep="")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement