Python Forum
Only one of two lines print/syntax error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Only one of two lines print/syntax error
#3
You print what is in the string wrapped in "". All that part ( and the comma after is ignored ) is like you want to print a bunch of variables named and, the, comma, after, is, ignored. You can do that but you have to separate them with a comma. So the right syntax will be:

print "I could have code like this.", and, the, comma, after, is, ignored
"And", "is" are key words in Python.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
RE: Only one of two lines print/syntax error - by wavic - Jan-12-2017, 07:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Print the next 3 lines knob 3 160 Yesterday, 12:26 PM
Last Post: andraee
  World Clock syntax error OscarBoots 1 260 May-03-2024, 05:20 AM
Last Post: snippsat
  Syntax error for "root = Tk()" dlwaddel 15 1,436 Jan-29-2024, 12:07 AM
Last Post: dlwaddel
Photo SYNTAX ERROR Yannko 3 480 Jan-19-2024, 01:20 PM
Last Post: rob101
  Syntax error while executing the Python code in Linux DivAsh 8 1,815 Jul-19-2023, 06:27 PM
Last Post: Lahearle
  Code is returning the incorrect values. syntax error 007sonic 6 1,329 Jun-19-2023, 03:35 AM
Last Post: 007sonic
  print(data) is suddenly invalid syntax db042190 6 1,286 Jun-14-2023, 02:55 PM
Last Post: deanhystad
  syntax error question - string mgallotti 5 1,417 Feb-03-2023, 05:10 PM
Last Post: mgallotti
  Syntax error? I don't see it KenHorse 4 1,362 Jan-15-2023, 07:49 PM
Last Post: Gribouillis
  Syntax error tibbj001 2 981 Dec-05-2022, 06:38 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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