What's this?
This is intended to be a collection of exercises, sample programs, and links to help
programmers who know Java, C, C++, or some some similar language get started
programming in Python.
Setting up
If you don't have Python installed already, try these
brief installation
instructions.
Sample programs
Read and experiment with these programs to learn some of the basics.
- basics.py
- Arithmetic, strings, conditionals, while loops, and boolean expressions.
- lists.py
- Lists and tuples.
- files.py
- File I/O, command-line arguments, and exceptions.
- dictionaries.py
- Dictionaries (a.k.a. associative arrays, hash tables, etc.).
- functions.py
- Functions.
- classes.py
- Classes.
- listsorting.py
- Sorting lists.
- dictionarysorting.py
- Sorting dictionaries.
- directories.py
- Directories.