1 · 30 lessons

Python foundations

Values, strings, control flow, functions, data structures, errors, files, JSON and dates, then a small project.

Progress and your code are kept in this browser only.

  1. 1Values and names
  2. 2Printing output
  3. 3Strings and f-strings
  4. 4Numbers
  5. 5Comparisons and booleans
  6. 6Branching
  7. 7None, the missing value
  8. 8Indexing and slicing
  9. 9String methods
  10. 10Loops
  11. 11break, continue and else
  12. 12Functions
  13. 13Local and global scope
  14. 14Lists
  15. 15List methods and copies
  16. 16Tuples and unpacking
  17. 17Dicts and sets
  18. 18More comprehensions
  19. 19Grouping and counting
  20. 20Nested data
  21. 21Recursion
  22. 22Sorting with key and lambda
  23. 23Errors and try/except
  24. 24Raising your own exceptions
  25. 25Reading and writing files
  26. 26Paths and folders
  27. 27JSON files
  28. 28Dates and times
  29. 29math and random
  30. 30Project: a word report