Python Forum
Unexpected character after line continuation character
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unexpected character after line continuation character
#1
I have a simple assignment to basically get name and address information and display it neatly with a single print statement. I'm getting an error "Unexpected character after line continuation character", but Googling the issue has brought me here to ask the question and hopefully get an answer as it pertains to my code.

firstName = input("What is your first name? ")
lastName = input("What is your last name? ")
houseNumber = input("What is your house number? ")
streetName = input("What is the name of the street you live on? ")
cityName = input("What city do you live in? ")
stateName = input("What is the two letter abbreviation of the state you live in? ")
zipCode = input("What is your zip code? ")
print(firstName, lastName\nhouseNumber, streetName\ncityName, stateName  zipCode)
I know it's something simple that I'm just not seeing, all of the other simple programs I've done so far have had only minor issues that I was able to resolve. This, however, is bugging the crap out of me and I hope someone can show me where the mistake is.

Thanks in advance to anyone with any advice. This is the second week of class and I'm actually enjoying every bit of it! Working towards a B.S. in Electronics Engineering.
Reply


Messages In This Thread
Unexpected character after line continuation character - by joshyb123 - Sep-05-2018, 05:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using regex to count specific character in file shamishd 1 1,641 Oct-01-2021, 07:33 AM
Last Post: snippsat
  Split string into 160-character chunks while adding text to each part iambobbiekings 9 9,652 Jan-27-2021, 08:15 AM
Last Post: iambobbiekings
  Replacing a few characters of a specified character but not all of them from a string fatherted99 7 3,278 Aug-13-2020, 09:08 AM
Last Post: fatherted99
  Change each character of list into an different characters Angry_bird89 1 2,081 Jun-19-2020, 08:29 AM
Last Post: Angry_bird89
  Search character from 2d list to 2d list AHK2019 3 2,524 Sep-25-2019, 08:14 PM
Last Post: ichabod801
  Tab character in a string prints 8 spaces hecresper 6 20,691 Aug-27-2019, 02:38 PM
Last Post: snippsat
  Print strings enclosed with a character with different characters aylmaoxd 1 1,943 Aug-17-2019, 03:35 PM
Last Post: Resistance
  Finding and storing all string with character A at middle position Pippi 2 2,703 Jan-20-2019, 08:23 AM
Last Post: Pippi
  Remove special character from list vestkok 3 4,268 Nov-04-2018, 01:48 PM
Last Post: ichabod801
  unexpected character after line continuation character error newbie 10 14,715 Aug-09-2018, 06:07 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020