1# Converts x to an integer. base specifies the base if x is a string.
2int(x [,base])
3
4# Converts x to a long integer. base specifies the base if x is a string.
5long(x [,base] )
6
7# Converts x to a floating-point number.
8float(x)
9
10# Creates a complex number.
11complex(real [,imag])
12
13# Converts object x to a string representation.
14str(x)
15
16# Converts object x to an expression string.
17repr(x)
18
19# Evaluates a string and returns an object.
20eval(str)
21
22# Converts s to a tuple.
23tuple(s)
24
25# Converts s to a list.
26list(s)
27
28# Converts s to a set.
29set(s)
30
31# Creates a dictionary. d must be a sequence of (key,value) tuples.
32dict(d)
33
34# Converts s to a frozen set.
35frozenset(s)
36
37# Converts an integer to a character.
38chr(x)
39
40# Converts an integer to a Unicode character.
41unichr(x)
42
43# Converts a single character to its integer value.
44ord(x)
45
46# Converts an integer to a hexadecimal string.
47hex(x)
48
49# Converts an integer to an octal string.
50oct(x)
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
1equationStrToInt = '8 * 8'
2eval(equationStrToInt)
3type(equationStrToInt)
4print(equationStrToInt)
5strToList = 'GREPPER'
6list(strToList)
7type(strToList)
8print(strToList)