Python

  • Introduction
  • Basic Syntax
  • Operators
  • Variables
  • Comments
  • If/Else Statements
  • Loops
  • Functions
  • Arrays
  • Libraries
  • Colours
  • Dictionaries
  • Enumerators
  • Classes
  • Exception Handling
  • File I/O Reading

Overview

Python is a coding language invented by Guido van Rossum to make coding... simple, as a look-alike to English if you will. When you look at Python code not knowing what it says, are you able to read it knowing what half of it does? Well if you do, then it's pretty much how the language was designed. Simple, and easy to understand. The language was developed and released to the public in the year 1991.

Setup

To run Python code, you need to set up Python on your device. The easiest way to do this is to install it from the official site. However, if you can't set it up on your device, there are also online compilers available so that you can run your code.
Examples of online interpreters include:



For the best experience, VS Code is a go-to editor for coding in general. A suitable extension for VS Code that makes Python coding easier is the Pylance extension. If downloading and setting up VS Code doesn't work for you, they also provide an online version too, however, as a side note, the editor will in fact lag if your project is very large.


Creating Python Files

All Python files end with the .py file extension. So in order to create a Python file, without a specific code editor, the easiest way is to create a .txt file, and rename the file extension to .py.

Got any questions?

Drop a comment below!

CodeStacks.

CodeStacks is © Copyright CodeStacks, 20XX.
All Rights Reserved.