Python tutorial

Learn Python with Interactive Tutorials

A beginner Python course: syntax, lists, functions, and files. Then NumPy, Pandas, Django, and a first machine-learning model. Every example runs in the browser at /try.

300+ chapters. The editor is /try.

Course overview

Start at intro, or jump to lists, Django, or a project.

What you get in this tutorial

  • print() and plots. The right pane is stdout, plus Matplotlib when you call show().
  • Its own editor. Lessons are under /tutorial. The editor is /try.
  • A chapter path. Read, change the example, press Next.

Lesson sequence

Every Python lesson, in order.

  1. 01Intro
  2. 02Get Started
  3. 03Syntax
  4. 04Comments
  5. 05Variables
  6. 06Variable Names
  7. 07Assign Multiple
  8. 08Output Variables
  9. 09Global Variables
  10. 10Data Types
  11. 11Numbers
  12. 12Casting
  13. 13Strings
  14. 14Slicing Strings
  15. 15Modify Strings
  16. 16Concatenate
  17. 17Escape Characters
  18. 18String Methods
  19. 19Booleans
  20. 20Operators
  21. 21Lists
  22. 22Access Lists
  23. 23Change Lists
  24. 24Add List Items
  25. 25Remove List Items
  26. 26Loop Lists
  27. 27List Comprehension
  28. 28Sort Lists
  29. 29Copy Lists
  30. 30Join Lists
  31. 31List Methods
  32. 32Tuples
  33. 33Access Tuples
  34. 34Update Tuples
  35. 35Unpack Tuples
  36. 36Loop Tuples
  37. 37Join Tuples
  38. 38Tuple Methods
  39. 39Sets
  40. 40Access Sets
  41. 41Add Set Items
  42. 42Remove Set Items
  43. 43Loop Sets
  44. 44Join Sets
  45. 45Set Methods
  46. 46Dictionaries
  47. 47Access Dicts
  48. 48Change Dicts
  49. 49Add Dict Items
  50. 50Remove Dict Items
  51. 51Loop Dicts
  52. 52Copy Dicts
  53. 53Nested Dicts
  54. 54Dict Methods
  55. 55If...Else
  56. 56Match
  57. 57While Loops
  58. 58For Loops
  59. 59Functions
  60. 60Lambda
  61. 61Arrays
  62. 62OOP
  63. 63Classes/Objects
  64. 64Inheritance
  65. 65Iterators
  66. 66Polymorphism
  67. 67Scope
  68. 68Modules
  69. 69Dates
  70. 70Math
  71. 71JSON
  72. 72RegEx
  73. 73PIP
  74. 74Try...Except
  75. 75String Formatting
  76. 76User Input
  77. 77VirtualEnv
  78. 78File Handling
  79. 79Read Files
  80. 80Write Files
  81. 81Delete Files
  82. 82DSA
  83. 83NumPy
  84. 84Pandas
  85. 85Matplotlib
  86. 86Machine Learning
  87. 87Django
  88. 88MySQL
  89. 89MongoDB
  90. 90Examples
  91. 91Projects

FAQ: Learn Python with Interactive Tutorials

Common questions about this page.

What is the StudyGrid Python tutorial?

The Python hub at /python is the course map for beginners: syntax, lists, functions, files, then NumPy, Django, and machine learning. Lessons live under /tutorial. The editor is /try.

Should I run python tutorial examples locally for better learning?

Yes. Use the browser editor on StudyGrid for a quick check, then Download the example and run it on your computer. Local runs show real errors and the real toolchain, which is one of the fastest ways to learn python tutorial in this Python Tutorial Python lesson (Learn Python with Interactive Tutorials).

Where should a beginner start Python?

Start at Python Intro, then Get Started and Syntax. After lists and if/else, continue to functions. Use Next at the bottom of each chapter.

Do I need to install Python?

No. Open a lesson, click Try it Yourself, and run the example in the browser. Install Python locally later if you want Django or files on disk.

How is /python different from a single lesson?

/python is the hub: overview, tracks, and every lesson link. A lesson such as Python if else answers one search, with examples and practice.

Is the Python tutorial free?

Yes. The full Python path on StudyGrid (studygrid.in) is free.