A byte of Python
Success in life is a matter not so much of talent and opportunity as of concentration and perseverance.
—- C.W. Wendte
Chapter 2. Introduction
Features of Python
SimpleEasy to LearnFree and Open SourceHigh-level LanguagePortableInterpretedObject OrientedExtensibleEmbeddable???Extensive Libraries
Chapter 4. First Steps
VimPyCharmEmacs
Chapter 5. Basics
print(
"Hello, World!")
Constant:
Numbers: (integers and float)Strings: (immutable)Single quotedouble quotetriple quote: for multi-line string.format method
format()'{0:.3f}'.format(1.0/3)'{0:_^11}'.format('Hello')escape sequences:\\ \n \tRaw string: no special processingVariable:Data Types:
numbersstringsclassesObject
s =
'this is a string.\
This continues the string.'
print(s)
print(\
s)