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'>
- Python | Convert List of String List to String List
- Long Short Term Memory Networks Explanation
- Text Generation using Recurrent Long Short Term Memory Network
- Well Equidistributed Long-period Linear
- Python | Program to convert String to a List
- Python | Convert a list of characters into a string
- Python | Convert Bytearray to Hexadecimal String
- Python | Convert String to tuple list
- Python | Program to convert a tuple to a string
- Python program to convert a list to string
- Python | Convert string to DateTime and vice-versa
- Python | Convert list of string to list of list
- Python | Convert dictionary object into string
- Python | Convert byteString key:value pair of dictionary to String
- Python | Convert a string representation of list into list
- Python | Convert list of string into sorted list of integer
- Python | Ways to convert string to json object
- Python | Convert heterogenous type String to List
- Python | Convert list of numerical string to list of Integers
- Python | Convert string enclosed list to list
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.