Convert String to Long in Python
Python defines type conversion functions to directly convert one data type to another. This article is aimed at providing information about converting a string to long.
Converting String to long
A long is an integer type value that has unlimited length. By converting a string into long we are translating the value of string type to long type. In Python3 int is upgraded to long by default which means that all the integers are long in Python3. So we can use int() to convert a string to long in Python.
string : consists of 1's and 0's base : (integer value) base of the number.example 1
<class 'str'> 123 <class 'int'>