Python Forum
what happened to these string?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what happened to these string?
#2
The bar's are multiline comments. The interesting line is a = """foo""". Put a space between the first and second, and the fifth and sixth quotes and print, and you get the spaces around foo. So, in an assignment statement the """ does not designate a comment, rather it is a null string followed by foo followed by a null string. Hmm. Didn't need plus signs... Double checking on this -
a="Hello ""world"
results in Hello world
Reply


Messages In This Thread
what happened to these string? - by Skaperen - Dec-11-2019, 01:52 AM
RE: what happened to these string? - by jefsummers - Dec-11-2019, 02:24 AM
RE: what happened to these string? - by ichabod801 - Dec-11-2019, 02:28 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  what happened here Ricardo14 2 2,577 Apr-20-2020, 04:05 PM
Last Post: Ricardo14

Forum Jump:

User Panel Messages

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