Giter VIP home page Giter VIP logo

python-reference's Introduction

Python Quick Reference

This is the reference guide to Python that I wish had existed when I was learning the language.

Here's what I want in a reference guide:

  • High-quality examples that show the simplest possible usage of a given feature
  • Explanatory comments, and descriptive variable names that eliminate the need for some comments
  • Presented as a single script (or notebook), so that I can keep it open and search it when needed
  • Code that can be run from top to bottom, with the relevant objects defined nearby

This is not written as a full-fledged Python tutorial, though I ordered the topics such that you can read it like a tutorial (i.e., each topic depends only on material preceding it).

The guide was written using Python 2 but is fully compatible with Python 3. Relevant differences between Python 2 and 3 are noted throughout the guide.

Table of Contents

Click to jump to the relevant section of the script or the notebook:

  1. Imports (script, notebook)
  2. Data Types (script, notebook)
  3. Math (script, notebook)
  4. Comparisons and Boolean Operations (script, notebook)
  5. Conditional Statements (script, notebook)
  6. Lists (script, notebook)
  7. Tuples (script, notebook)
  8. Strings (script, notebook)
  9. Dictionaries (script, notebook)
  10. Sets (script, notebook)
  11. Defining Functions (script, notebook)
  12. Anonymous (Lambda) Functions (script, notebook)
  13. For Loops and While Loops (script, notebook)
  14. Comprehensions (script, notebook)
  15. Map and Filter (script, notebook)

Other Python Resources

If you like the general format of this guide, but need more explanation of each topic, I highly recommend reading the Appendix of Python for Data Analysis. It presents the essentials of the Python language in a clear and focused manner.

If you are looking for a resource that will help you to learn Python from scratch, this is my list of recommended resources.

Suggestions or Corrections

If there's a topic or example you'd like me to add to this guide, or you notice a mistake, please create a GitHub issue or leave a blog comment.

Thank you!

python-reference's People

Contributors

c3cris avatar justmarkham avatar mkaz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.