Conversions - Python
Data Type Conversions
Python has built in functions to convert between different data types. To convert something to an integer you would enter:
<syntaxhiglight lang=python> number = int( textEntered) </syntaxhighlight>
or if you wanted to get the input direct from the user you could do this instead:
<syntaxhiglight lang=python> name = int( input(“enter a number”) ) </syntaxhighlight>
Other conversion functions are available: