Skip to content

A Python 3 programming tutorial for beginners.

License

Notifications You must be signed in to change notification settings

leriomaggio/python-tutorial

 
 

Repository files navigation

Python programming tutorial @ PyCon X Beginner's Day

This is a concise Python 3 programming tutorial for people who think that reading is boring. I try to show everything with simple code examples; there are no long and complicated explanations with fancy words. If you have never programmed before click here to find out what programming is like and get started.

This tutorial is composed in a basic part, aimed at people with no programming experience at all or very little programming experience and an advance one for people who want to learn more about python. If you have programmed a lot in the past using some other language you may want to read the official tutorial also.

You can use Python 3.6 or any newer Python with this tutorial. Don't use Python 2. If you write a Python 2 program now someone will need to convert it to Python 3 later, so it's best to just write Python 3 to begin with. Python 3 code will work just fine in Python 4, so you don't need to worry about that. Python 2 also has horrible Unicode problems, so it's difficult to write Python 2 code that works correctly with non-English characters (like π and ♫).

List of contents

The tutorial consists of two sections:

Basics

This section will get you started with using Python and you'll be able to learn more about whatever you want after studying it.

  1. What is programming?
  2. Installing Python
  3. Getting started with Python
  4. ThinkPython: The way of the program
  5. Variables, Booleans and None
  6. Using functions
  7. Setting up an editor
  8. If, else and elif
  9. Handy stuff with strings
  10. Lists and tuples
  11. Loops
  12. Trey Hunner: zip and enumerate
  13. Dictionaries
  14. Defining functions
  15. Writing a larger program
  16. What is true?
  17. Files
  18. Docstrings

Advanced

If you want to learn more advanced techniques, you can also read this section. Most of the techniques explained here are great when you're working on a large project, and your code would be really repetitive without these things.

You can experient with these things freely, but please don't use these techniques just because you know how to use them. Prefer the simple techniques from the Basics part instead when possible. REMEMBER: Simple is better than complex.

  1. Modules
  2. Exceptions
  3. Classes
  4. NamedTuples
  5. Handy data types
  6. Advanced stuff with functions
  7. Magic methods
  8. Iterables, iterators and generators

Other things this tutorial comes with

Frequently asked questions

Special thanks

Thanks to Akuli who wrote the most of this tutorial


List of contents

About

A Python 3 programming tutorial for beginners.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.0%
  • CSS 1.0%