Python Tutorial in Hindi #2 - Variables and Data Types

Variables and Data Types in Python | Python Programming in Hindi | Mohit Decodes


In this video, we’ll dive into one of the core building blocks of any programming language — Variables and Data Types in Python. This is an essential topic for beginners, and we'll cover it in a simple and easy-to-understand way in Hindi.


This is the Python Full Course in Hindi 2025, and it's perfect for anyone starting their programming journey.


Topics Covered in this Video:

-What are Variables in Python

-Variable Naming Rules and Conventions

-Python Data Types: Numbers, Strings, Booleans

-Dynamic Typing in Python

-Type Checking using type()

-Type Casting and Conversion in Python


What You’ll Learn:

-How Python handles variables and memory

-The difference between int, float, str, and bool

-How to convert between data types (e.g., int() ↔ str())

-Real-life examples for better understanding


# Python Tutorial #2 - Variables and Data Types


# ✅ Variables

x = 10 # integer

y = 3.14 # float

name = "Mohit" # string

is_active = True # boolean


# ✅ Printing values

print(x)

print(y)

print(name)

print(is_active)


# ✅ Checking type of each variable

print(type(x)) # <class 'int'>

print(type(y)) # <class 'float'>

print(type(name)) # <class 'str'>

print(type(is_active))# <class 'bool'>


# ✅ Dynamic Typing Example

x = "Now I'm a string"

print(x)

print(type(x)) # <class 'str'>


# ✅ Type Casting / Conversion

a = "100"

b = int(a) # convert string to int

print(b + 20)


c = 10.75

d = int(c) # convert float to int

print(d)


e = str(123)

print("Value of e is " + e)


# ✅ Multiple Assignments

p, q, r = 1, 2, 3

print(p, q, r)


# ✅ Constants (by convention)

PI = 3.14159

GRAVITY = 9.8

print(PI, GRAVITY)


# ✅ Data Type Examples

num = 25 # int

price = 99.99 # float

language = "Python" # str

is_python_easy = True # bool


print(num, price, language, is_python_easy)