import locale
locale.setlocale( locale.LC_ALL, 'en_US.UTF-8' )
locale.atoi('1,000,000')
# 1000000
locale.atof('1,000,000.53')
# 1000000.53
More Related Contents:
- Replace list object based on indexes of another list (Python)
- How does .'{} ohm{}’.format(total, ‘s’ * (total > 1)) in the function?
- How do I type hint a method with the type of the enclosing class?
- Are a WSGI server and HTTP server required to serve a Flask app?
- Reading a UTF8 CSV file with Python
- Editing specific line in text file in Python
- List all the modules that are part of a python package?
- Hashing a file in Python
- What does a leading `\x` mean in a Python string `\xaa`
- How to determine file, function and line number?
- Switching into new window using Selenium after button click
- Python pickling after changing a module’s directory
- unable to call firefox from selenium in python on AWS machine
- Click Command Line Interfaces: Make options required if other optional option is unset
- What is dtype(‘O’), in pandas?
- How to properly stop phantomjs execution
- Co-occurrence matrix from nested list of words
- (discord.py) Getting a list of all of the members in a specific voice channel
- Zip with list output instead of tuple
- How to increment a row count in groupby in DataFrame
- How can I split a URL string up into separate parts in Python?
- Index 2D numpy array by a 2D array of indices without loops
- Built in Python hash() function
- What does “lambda” mean in Python, and what’s the simplest way to use it?
- How can I copy a Python string?
- count number of black pixels in an image in Python with OpenCV
- Accurate timing of functions in python
- Numpy transpose of 1D array not giving expected result
- All possible permutations of a set of lists in Python
- Auto updating a python executable generated with pyinstaller