Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Python 3 programming tutorial for beginners.

License

NotificationsYou must be signed in to change notification settings

Akuli/python-tutorial

Repository files navigation

This is a concise Python 3 programming tutorial for people who thinkthat reading is boring. I try to show everything with simple codeexamples; there are no long and complicated explanations with fancywords. If you have never programmed before clickhere to find out what programming islike and get started.

This tutorial is aimed at people with no programming experience at allor very little programming experience. If you have programmed a lot inthe past using some other language you may want to readthe officialtutorial instead.

You can use Python 3.6 or any newer Python with this tutorial.Don'tuse 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 ableto 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 thissection. Most of the techniques explained here are great when you'reworking on a large project, and your code would be really repetitivewithout these things.

You can experiment with these things freely, but pleasedon't use thesetechniques just because you know how to use them. Prefer the simpletechniques from the Basics part instead when possible. Simple is betterthan 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 meand other people that you like this tutorial.

Gohere if you aren't herealready and click the "Star" button in the top right corner. You will beasked to create a GitHub account if you don't already have one.

How can I read this tutorial without an Internet connection?

  1. Gohere if you aren'there already.

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

    Download ZIP

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

  4. Runmake-html.py and follow the instructions.

If you have git and you know how to use it, you can also clone therepository instead of downloading a zip and extracting it. An advantagewith doing it this way is that you don't need to download the wholetutorial again to get the latest version of it, all you need to do is topull with git and runmake-html.py again.

Authors

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


If you have trouble with this tutorial, pleasetell me about it and I'll make this tutorial better,orask for help online.If you like this tutorial, pleasegive it astar.

You may use this tutorial freely at your own risk. SeeLICENSE.

List of contents


[8]ページ先頭

©2009-2025 Movatter.jp