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

TypeExample
Integer10, -5
Float3.5, 7.89
String"hello"
BooleanTrue, False
NoneRepresents 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

Share this Post


← Back to Tutorials

Popular Competitive Exam Quizzes