Python
Variable:- Container that hold data
a = 1
b = True
c = "Harry"
d = None
DATA TYPES:-Data type specifies the type of value a variable holds
a = 1
print(type(a))
b = "1"
print(type(b))
TYPECASTING
conversion of one data type into other data type is known as typecasting or type
conversion in python
1)EXPLICIT TYPECASTING
The conversion of one data type into another data type, done via developer or
programmer's intervention or manually as per the requirement, is known as explicit
type conversion.
Python’s built in functions such as int(), float(), hex(), oct(), str(), etc are
used to do so
2)IMPLICIT TYPECASTING
here one data type is converted into other by python interpreter
itself(automatically)
accourding to the level of data types one data type is converted to an higher level
MATCH CASE STATEMENT
match variable_name:
case ‘pattern1’ : //statement1
case ‘pattern2’ : //statement2
…
case ‘pattern n’ : //statement n