Python Basics: Variables and Data Types
π Python for Data Science
π 107 views
π
Nov 14, 2025
β± Estimated reading time: 1 min
What is a Variable?
A variable stores data in memory. You donβt need to declare its type in Python.
Examples
a = 10
b = "Python"
c = 3.14
Python Data Types
| Type | Example |
|---|---|
| Integer | 10, -5 |
| Float | 3.5, 7.89 |
| String | "hello" |
| Boolean | True, False |
| None | Represents null |
Type Casting
int("10")
float("3.14")
str(100)
User Input
name = input("Enter name: ")
print(name)
Variables act as the building blocks of all computations. Next, we cover control flow.
π Some advanced sections are available for Registered Members
Register Now
Register Now
Share this Post
β Back to Tutorials