702 views

1 Answer

0 0 votes

Type conversion refers to the conversion of one data type into another.

int() - converts any data type into integer type

float() - converts any data type into float type

ord() - converts characters into integer

hex() - converts integers to hexadecimal

oct() - converts integer to octal

tuple() - This function is used to convert to a tuple.

set() - This function returns the type after converting to set.

list() - This function is used to convert any data type to a list type.

dict() - This function is used to convert a tuple of order (key,value) into a dictionary.

str() - Used to convert integer into a string.

complex(real,image) - This function converts real numbers to complex(real,image) number.

Related questions

1 1 vote
1 1 answer
596
596 views
1 1 vote
1 1 answer
614
614 views
askpython asked Jul 9, 2019
614 views
1 1 vote
1 1 answer
664
664 views
1 1 vote
1 1 answer
606
606 views
askpython asked Jul 9, 2019
606 views
0 0 votes
1 1 answer
688
688 views