Ok, so I did:
city = input("What part of Japan did you visit? ")
answer = "Great, {}".format(city), "is an interesting city!"
print(answer)
And the output I get is:
What part of Japan did you visit? kanazawa
(‘Great, kanazawa’, ‘is an interesting city!’)
If I do:
print("Great, {}".format(city), "is an interesting city!")
it works well.
L.E.
I used an f string instead and it worked. I am just curious how could I print the answer variable using .format()
So I did:
city = input("What part of Japan did you visit? ")
answer = f"Great, {city} is an interesting city!"
print(answer)
and the output:
What part of Japan did you visit? kanazawa
Great, kanazawa is an interesting city!