1int(anyData) #any into integer
2str(anyData) #any into string
3ord(chr) #character into number
4hex(int) #integer into hexadecimal string
5oct(int) #integer into octal string
6float(anyData) #any into float
7tuple() #convert to tuple
8set() #returns the type after converting to set
9list() #convert any data type to a list
10dict() #convert a tuple of order (key,value) into a dictionary
11complex(real,imag) #converts real numbers to complex(real,imag) number
1num_int = 123
2num_str = "456"
3
4print("Data type of num_int:",type(num_int))
5print("Data type of num_str before Type Casting:",type(num_str))
6
7num_str = int(num_str)
8print("Data type of num_str after Type Casting:",type(num_str))
9
10num_sum = num_int + num_str
11
12print("Sum of num_int and num_str:",num_sum)
13print("Data type of the sum:",type(num_sum))