700 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
594
594 views
1 1 vote
1 1 answer
612
612 views
askpython asked Jul 9, 2019
612 views
1 1 vote
1 1 answer
662
662 views
1 1 vote
1 1 answer
604
604 views
askpython asked Jul 9, 2019
604 views
0 0 votes
1 1 answer
686
686 views