Cheatsheets are good when you want to revise some of the concepts but not an idle way to start learning.

#Theory

  • Python is a scripting language.
  • Scripting vs. Compiled? - Language like c++/java’s code needs to be compiled by its compiler. After compilation, it is just machine-level code. Whereas in a scripting language, its interpreter will be run the code on the spot one line at a time.

#VSCODE extension:

  • Python
  • Python for vscode
  • Magic Python
  • Arepl

#Making a virtual env:

#Why Virtual env?

Because managing python dependencies is a mess, this will install dependencies for that project only instead of globally.

  • python -m venv venv this will create a venv folder in your directory.
  • source ./venv/bin/activate this will activate this virtual env.

#Comments in python

  • single-line use #

None

Bash

CSS

C

C#

Go

HTML

Java

JavaScript

JSON

PHP

Powershell

Python

Ruby

SQL

TypeScript

YAML

Copy

## single line comments
  • multiline use '''. often called as docstring, as it is just to document function/classes.

None

Bash

CSS

C

C#

Go

HTML

Java

JavaScript

JSON

PHP

Powershell

Python

Ruby

SQL

TypeScript

YAML

Copy

'''
This is a example of 
Multiline comment.
'''

#Data Types:

  • int ## Whole Numbers
  • float ## Number with decimals.
  • str ## String
  • list ## ordered sequence of object
  • dict ## unordered key-value pairs.
  • tup ## ordered immutable seq. of objects.
  • set ## Unordered collection of unique objs.
  • bool ## Logical value True / False.
  • None ## no value

#python #cheatsheet #python-cheatsheet #coding-skills #programming #python-tutorials #learn-python #programming-language

Learning Python: A Cheatsheet for Beginners🔥
2.05 GEEK