I am using Python for reference. I am trying to create a new line when displaying name, address, city, state, and zip code. However, when I do this, IDLE tells me that "unexpected character after line continuation character". My code is as follows:
name = input('What is your name? ') address = input('What is your street address? ') city = input('What city do you live in? ') state = input('What state do you live in? ') zip_code = input('What is your zip code? ') print(name\naddress) I know that I can print each thing separately but I want to know how I can print the result using one print function. I know I can do it if I were to have simple text such as: print('You have to\nshow up to class')
I am basically looking for the code to result as follows:
firstName lastName (first line)
address (second line)
city, state zip-code (third line)
Is there any way to input new lines before variables?
Any help would be appreciated!