Type Casting in Python for BEGINNERS (EASY)! 🤩

Опубликовано: 30 Июль 2026
на канале: The Way Of Code
19
0

Type Casting - Essentially just changing the data type of a variable
Data types-
String (For words or number encased in " ")
Integer (For whole positive/negative numbers)
Float (For numbers with decimals)
Boolean(True/False)

Example -
a = "2"
b = "2"
print(a + b) outputs 22 while print(int(a) +int(b)) outputs 4
The addition of strings only combines the 2 strings together


#python #pythonprogramming #beginnercourse #pythonbasicsforbeginners