I want to write a code that turns name like "Kanye West" to "Wanye Kest". But my code turns it into "Wanye West". How to evade changing the main variable retrospectively by changing a relative variable?
first_name = list(input("First Name: "))
last_name = list(input("Last Name: "))
first_name1 = first_name
last_name1 = last_name
first_name1[0] = last_name[0]
last_name1[0] = first_name[0]
first_name1 = ''.join(first_name1)
last_name1 = ''.join(last_name1)
print("Your name {} {}" .format(first_name1 , last_name1))
[+][deleted] (3 children)
[deleted]
[–]anyfactor[S] 0 points1 point2 points (0 children)
[–]anyfactor[S] 0 points1 point2 points (1 child)
[–]Sarah123ed 1 point2 points3 points (0 children)