Skip to content
Kamal Banga edited this page Oct 5, 2018 · 62 revisions

Work in Progress 🚧 🏗

This Python 3 wiki is a free mini-book 📘:

⚡️ Python in a Flash: Idioms & Recipes

Contents

  1. Tutorial: For those who know programming in C++/Java and want to learn Python.
  2. Reference 📃: Contains common usage with examples
  3. Idioms 💯: Better/Pythonic ways of doing common tasks
  4. Common Pitfalls ⁉️: Most prominent mistakes and Python quirks
  5. Snippets for Fun and Profit: Coding is best learnt by tinkering with common recipes.

Notation:

  1. >>> means code is being run on python or ipython repl in terminal

Why learn Python?

  • 📈 Python has had incredible growth and is the fastest-growing major programming language.
  • It can do everything data from handling voluminous data (Apache Spark), exploring datasets (Numpy and Pandas), to machine learning (Scikit-learn and PyTorch).
  • 🌏 It harbours one of the most used web frameworks (Django).
  • 💡 It is dynamically typed and hence the learning curve is easy. It has first-class functions which means you can start learning and using it right away instead of the OOP bloat.

Links to Great Blogposts


Credits

  1. Closures in Common Pitfalls chapter is taken from the book Fluent Python.
  2. Strings section in Reference chapter contains snippets from the book Python Cookbook, 3rd Ed.
  3. Central Limit Theorem and Pythagorean triplets snippets in Fun chapter are taken from Raymond Hettinger's tweets. The advice of "Specialized tool beats a general purpose tool" also comes from him.
  4. DFS in Fun chapter is taken from Edd Mann's blog.
  5. Example in Floating Point section in Common Pitfalls chapter is taken from Rachel Thomas' Computational Linear Algebra.

Direct links

Iterators

Bell Curve

Clone this wiki locally