Python Tutorial
There is a Python, pithy. Mighty, lissome, and tabby. Algorithms it puffs, Conundrums it snuffs. And cherished by those savvy.
This tutorial is:
- For beginners. Especially for mathematicians and scientists who never coded Python before.
- Written in the most simple way you can understand. But not assuming you are children.
- Written in a cold style. No ninja zen no joke.
- Example based. Standalone code for every concept.
- Plain English. Things explained in terms of what keyword and syntax do. No unnecessary jargon. (e.g. No “object oriented”, no “design patterns”.)
Table of Contents
Overview
Help
Comment
String
- Quote String
- Triple Quote String
- Raw String
- String Prefix Char
- f-String (Format, Template)
- String Escape Sequence
- Print String
- Print Without Newline
- Convert to String
- Join String
- Format String
- String Methods
- Search Substring
- Split String
- String, Check Case, Char Class
- Letter Case Conversion
Arithmetic
Boolean
Conditional
Loop, Iteration
Data Structure
List
- List
- Generate List: range
- List Comprehension
- List Methods
- Iterate List
- Map f to List
- Filter List
- Iterator to List
- Copy Nested List, Shallow Copy vs Deep Copy
- Interweave Lists to Tuples, Transpose
- Sort
- Convert List to Dictionary
Dictionary
Tuple
Sets
JSON
Function
Class
Module
- Import Module
- Show Module Doc
- List Module Functions
- List Modules, List Loaded Modules
- Module Search Paths
- How to Write a Module
Regex
Read Write File
Unicode, Encoding
- Unicode 🐍
- Python 2: Unicode Tutorial
- Allowed Characters in Identifiers
- Set STDOUT Encoding to UTF-8
- Unicode Escape Sequence
- Get Unicode Name, Codepoint
- Convert File Encoding
Misc
- Format Code
- Datetime
- Timing, Benchmark
- Get Environment Variable
- System Call
- Get Command Line Args
- Compress Decompress Gzip File
- Get Image Size
- Transpose Matrix
Script Examples
Web Examples
Testimonials

