Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Docs missing info?
#2
you should pay more attention to details - you are missing number of quotes in the code

print('hello', '\n', 'world') # here \n is an escape sequence for new line
you can find more info here https://docs.python.org/3.6/reference/le...?#literals


and here is example from PEP8 for use of \ as line continuation char

with open('/path/to/some/file/you/want/to/read') as file_1, \
     open('/path/to/some/file/being/written', 'w') as file_2:
    file_2.write(file_1.read())
Reply


Messages In This Thread
Docs missing info? - by tozqo - Jun-20-2017, 11:07 AM
RE: Docs missing info? - by buran - Jun-20-2017, 11:23 AM
RE: Docs missing info? - by Kebap - Jun-21-2017, 06:50 AM
RE: Docs missing info? - by tozqo - Jun-20-2017, 01:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  where is documentation for stat result attributes in PDF docs? Skaperen 5 1,118 May-18-2023, 07:24 PM
Last Post: Skaperen
  frozenset.copy() docs wrong Skaperen 8 3,775 Apr-08-2020, 12:56 AM
Last Post: Skaperen
  looking up docs for open file methods Skaperen 3 2,509 Nov-10-2019, 01:08 AM
Last Post: Skaperen
  Operator Precedence Direction in Docs blitz4 3 3,195 Mar-11-2018, 06:15 AM
Last Post: wavic

Forum Jump:

User Panel Messages

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