• Stars
    star
    1,354
  • Rank 34,700 (Top 0.7 %)
  • Language
    Python
  • License
    Other
  • Created over 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Python 3 programming tutorial for beginners.

Python programming tutorial for beginners

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 aimed at people with no programming experience at all or very little programming experience. If you have programmed a lot in the past using some other language you may want to read the official tutorial instead.

You can use Python 3.6 or any newer Python with this tutorial. Don't use Python 2 because it's no longer supported.

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. zip and enumerate
  13. Dictionaries
  14. Defining functions
  15. Writing a larger program
  16. What is true?
  17. Files
  18. Modules
  19. Exceptions
  20. Classes
  21. 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 experiment 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. Simple is better than complex.

  1. Handy data types
  2. Advanced stuff with functions
  3. Magic methods
  4. Iterables, iterators and generators

Other things this tutorial comes with

Frequently asked questions

How can I thank you for writing and sharing this tutorial?

You can star this tutorial. Starring is free for you, but it tells me and other people that you like this tutorial.

Go here if you aren't here already and click the "Star" button in the top right corner. You will be asked to create a GitHub account if you don't already have one.

How can I read this tutorial without an Internet connection?

  1. Go here if you aren't here already.

  2. Click the big green "Clone or download" button in the top right of the page, then click "Download ZIP".

    Download ZIP

  3. Extract the ZIP and open it. Unfortunately I don't have any more specific instructions because how exactly this is done depends on which operating system you run.

  4. Run make-html.py and follow the instructions.

If you have git and you know how to use it, you can also clone the repository instead of downloading a zip and extracting it. An advantage with doing it this way is that you don't need to download the whole tutorial again to get the latest version of it, all you need to do is to pull with git and run make-html.py again.

Authors

I'm Akuli and I have written most of this tutorial, but other people have helped me with it. See github's contributors page for details.


If you have trouble with this tutorial, please tell me about it and I'll make this tutorial better, or ask for help online. If you like this tutorial, please give it a star.

You may use this tutorial freely at your own risk. See LICENSE.

List of contents

More Repositories

1

porcupine

A decent editor written in tkinter
Python
157
star
2

tkinter-tutorial

Tkinter tutorial for beginners.
Python
120
star
3

teek

Simpler alternative to tkinter.
Python
31
star
4

math-tutorial

Practical math tutorial for programmers.
Python
25
star
5

curses-minesweeper

Minesweeper game written in curses with zig
Zig
17
star
6

jou

Yet another programming language
Python
11
star
7

mantaray

An IRC client written in Python with Tkinter.
Python
11
star
8

git-guide

A practical guide to using git with github that hopefully doesn't suck.
Mako
7
star
9

classtree

A program that prints a tree of classes in a Python module.
Python
6
star
10

odotdot

Funny programming language
C
6
star
11

asda

My attempt at making a statically typed programming language
Python
5
star
12

oomph

Yet another attempt at making a usable programming language
Python
4
star
13

import-that

Bad Python practice tutorial.
4
star
14

py-tree-sitter-builds

Binary wheels for using py-tree-sitter without a C compiler
Python
4
star
15

derivater

Simple symbolic calculation library for Python
Python
3
star
16

math-derivations

Derivations and proofs of math things
Python
3
star
17

BananaGUI

Simple wrapper for popular Python GUI toolkits.
Python
3
star
18

triotk

Tiny module for using Trio with Tkinter
Python
2
star
19

stupid-c-repl

Stupid REPL for C and C++
Python
2
star
20

music-theory

A website that explains music theory using mathematics (Finnish)
Python
2
star
21

weird-language

weird programming language
Python
1
star
22

the-simple-noteprogram

Simple note-taking program written in Python 3 with GTK+ 3.
Python
1
star
23

mathpaste-gtk

Gtk program for using mathpaste
Python
1
star
24

happy-birthday

Happy birthday zaab :)
Python
1
star
25

snake

My version of the classic snake game. It's not as boring as you think it is...
Python
1
star
26

curses-klondike

Terminal klondike solitaire game
C++
1
star
27

mittari

Analog CPU and RAM usage meters for my computer
Python
1
star
28

gtk-reminder

Simple reminding program written in C using GTK+ 3.
C
1
star
29

potti

IRC bot that lets users run arbitrary Python code
Python
1
star
30

catris

The classic game of falling blocks, but with online multiplayer
Rust
1
star