s = input ("Type a number:")

int_s = int (s) #Conversion of string to int
print (type(int_s))

float_s = float (s) #Conversion of string to float
print (type(float_s))

complex_s = complex (s) #Conversion of string into complex number
print (type(complex_s))
Younes Derfoufi
my-courses.net

Leave a Reply