Difference between revisions of "Python notes"
From Wiki at Neela Nurseries
m (add note how to assign long lines of bytes to variables.) |
m (→^ Questions) |
||
Line 15: | Line 15: | ||
</pre> | </pre> | ||
+ | Question: what is method chaining in Python? | ||
+ | <ul> | ||
+ | * https://note.nkmk.me/en/python-method-chain-line-break/ | ||
+ | </ul> | ||
<!-- odne komentar --> | <!-- odne komentar --> | ||
+ | |||
== [[#top|^]] Python Data Types == | == [[#top|^]] Python Data Types == | ||
Revision as of 20:11, 14 February 2024
2023-10-11 Wednesday
^ Overview
Python notes local page on Neela Nurseries wiki
^ Questions
Question: what is the syntax or python-ism in this construcxt?:
if __name__ == '__main__': main()
Question: what is method chaining in Python?
^ Python Data Types
The following Python3 online documentation page mentions early on how Python distinguishes Unicode strings and 8-bit strings which it also calls 'bytes'. This may be a starting point to understanding how and when Python3 treats data as bytes:
^ Strings and Long Lines
To express long lines in Python there are a couple of methods. The `textwrap` library or module contains some utils to help with this. To use parentheses about a multi-line string also provides a way.