Skip to content

fireship-io/code-this-not-that-python-edition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Code this ✅ Not that ❌ - Python Edition

10 Tips to make your code more Pythonic.

  • Learn the pythonic way to make a null check.
  • Use the "in" keyword to check if a variable is included in an iterable.
  • Use list comprehensions for simple loops.
  • Use any/all.
  • Learn the purpose of enumerate and zip.
  • Use tuple unpacking.
  • Learn about Python's syntax for a ternary operator.
  • Use generators.
  • Be careful with mutable default arguments
  • Use context managers.

About

10 tips to make your code more Pythonic

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages