Examples
- E4.1Assignment vs. the comparison operator
- E4.2Exception tracebacks
- E4.3String representation of vectors
- E4.4Vector cross product
- E4.5try ... except ... else ... finally
- E4.6A simple dictionary of Roman numerals
- E4.7A simple database of astronomical objects
- E4.8Word lengths in the first line of the Gettysburg Address
- E4.9Mersenne primes
- E4.10The matrix transpose by list comprehension
- E4.11lambda functions
- E4.12Sorting methods
- E4.13Triangular numbers
- E4.14Assignment expressions (the walrus operator)
- E4.15Issuing a usage method
- E4.16Batch renaming of files
- E4.17The Monty Hall problem
- E4.18A simple Python class
- E4.19The random-flight polymer
- E4.20A 2D vector class
- E4.21A simple 2D molecular dynamics simulation