Day 1: Python Variables & Data Types – Notes

✅ Variables

x = 10     # int
name = "Shaivi"  # str

✅ Data Types

int, float, str, bool, list, tuple, dict, set

Use type(variable) to check.

✅ Input/Output

x = input("Enter value: ")  # Always returns str
y = int(x)  # Convert to int if needed

✅ Type Conversion

str(10) → '10'
int('20') → 20
float('3.14') → 3.14

✅ Tip:

Use f-strings for clean output:

print(f"The value is {{x}}")