| | |
Python Code Help!
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Feb 2007
Posts: 9
Reputation:
Solved Threads: 0
I'm looking in a my python book and it says when using multi-line strings,
"You can think of a text file as a string that happens to be stored on disk. Of cource, a typical file generally contains more than a single line of text. A special character or sequence of characters is used to mark the end of each line. There are numerous conventions for end-of-line markers. Python uses a single character called newline."
"You can think of a newline as the character produced when you press the <enter> key on your keyboard. Although a newline is a single character, it is represented in Python using the special notation '/n'.
Hope that helps you out. It was under the "Multi-Line Strings" section.
"You can think of a text file as a string that happens to be stored on disk. Of cource, a typical file generally contains more than a single line of text. A special character or sequence of characters is used to mark the end of each line. There are numerous conventions for end-of-line markers. Python uses a single character called newline."
"You can think of a newline as the character produced when you press the <enter> key on your keyboard. Although a newline is a single character, it is represented in Python using the special notation '/n'.
Hope that helps you out. It was under the "Multi-Line Strings" section.
![]() |
Similar Threads
- Starting Python (Python)
- How to do Input in Python? (Python)
- Display Python code on Blogspot (Python)
- Python! Thoughts? (Python)
- Help with Python code and accessing ZODB (Python)
- Convert python code to C++ (C++)
- convert python to java (Python)
Other Threads in the Python Forum
- Previous Thread: wxPython tutorials?
- Next Thread: Simple program help
Views: 2398 | Replies: 9
| Thread Tools | Search this Thread |
Tag cloud for Python
anti approximation array avogadro basic beginner builtin cipher clear code color converter countpasswordentry cturtle curved def dictionary drive dynamic examples excel file float format frange ftp function gui heads homework import input java lapse library line lines linux list lists loop mouse multiple mysqldb mysqlquery newb number numbers output parsing path port prime program programming projects py2exe pygame pymailer pyqt python random raw_input recursion recursive redirect script scrolledtext server singleton sqlite ssh stamp string strings subprocess sum syntax table terminal text textarea thread threading time tkinter tlapse tuple tutorial twoup ubuntu unicode urllib urllib2 variable web-scrape wikipedia windows word wxpython





