Neylora Data & AI Academy

Free Python Learning Resource

Python Cheat Sheet for Beginners

This Python cheat sheet provides a quick reference for beginners learning Python programming for Data Science and Data Analytics.

1. Variables


name = "Nithya"
age = 25
salary = 50000

2. Data Types


name = "Python"       # String

age = 25              # Integer

price = 99.50         # Float

is_valid = True       # Boolean

3. Lists


numbers = [10, 20, 30, 40]

print(numbers[0])

numbers.append(50)

4. Conditional Statements


age = 20

if age >= 18:
    print("Adult")
else:
    print("Minor")

5. For Loop


for i in range(5):
    print(i)

6. Functions


def add(a, b):

    return a + b

result = add(10, 20)

print(result)

7. Dictionary


student = {
    "name": "Rahul",
    "age": 20,
    "marks": 85
}

print(student["name"])

8. Useful Python Functions


len()
type()
print()
range()
sum()
max()
min()
sorted()

9. Python for Data Science


import numpy as np

import pandas as pd

import matplotlib.pyplot as plt

More Learning Resources

Explore more free Data Science, Python, Machine Learning and AI resources from Neylora Data & AI Academy.

← Back to Neylora Data & AI Academy