Contents
Chapter 1: Getting started with Python Language ...................................................................................... 2
Section 1.1: Getting Started ........................................................................................................................................... 2
Section 1.2: Creating variables and assigning values ................................................................................................ 6
Section 5.11: Parsing a string with a short time zone name into a timezone aware datetime object ................ 47
Section 13.5: Functions skip class scope when looking up names ......................................................................... 76
Section 21.6: Generator Expressions ........................................................................................................................ 138
Section 38.7: Multiple Inheritance ............................................................................................................................ 217
Section 71.3: Getting the index for strings: str.index(), str.rindex() and str.find(), str.rfind() ............................... 372
Section 88.9: Practical examples of exception handling ....................................................................................... 445
Chapter 102: String representations of class instances: __str__ and __repr__
methods ........................................................................................................................................................................ 491
Section 115.1: Serialization using JSON .................................................................................................................... 533
Chapter 148: Immutable datatypes(int, float, str, tuple and frozensets) .................................. 624
Section 155.3: Adding Relationships to Neo4j Graph ............................................................................................. 664
Section 192.4: Choosing Assertions Within Unittests ............................................................................................. 774
You may also like ...................................................................................................................................................... 831
Chapter 1: Getting started with Python Language
Python 3.x
Version Release Date
3.8 2020-04-29
3.7 2018-06-27
3.6 2016-12-23
3.5 2015-09-13
3.4 2014-03-17
3.3 2012-09-29
3.2 2011-02-20
3.1 2009-06-26
3.0 2008-12-03
Python 2.x
Version Release Date
2.7 2010-07-03
2.6 2008-10-02
2.5 2006-09-19
2.4 2004-11-30
2.3 2003-07-29
2.2 2001-12-21
2.1 2001-04-15
2.0 2000-10-16
Section 1.1: Getting Started
Python is a widely used high-level programming language for general-purpose programming, created by Guido van Rossum and first released in 1991. Python features a dynamic type system and automatic memory management and supports multiple programming paradigms, including object-oriented, imperative, functional programming, and procedural styles. It has a large and comprehensive standard library.
Two major versions of Python are currently in active use:
Python 3.x is the current version and is under active development.