On this page
locale.atoi
Prev: locale.atof | Up: locale | Next: locale.currency
Rel: locale.atof, locale.currency, locale.Error, locale.format_string
Ref: docs.python.org — locale.atoi
Tags: #public #python3 #stdlib #locale
Import
import locale
from locale import atoi
Signature & Overview
locale.atoi(string)
Converts a string to an integer according to the locale settings.
Usage
import locale
assert locale.atoi("42") == 42
Gotchas
- Parses integers respecting locale thousands grouping.
REPL Inspect
from locale import atoi
help(atoi)
Linked from
- tuts/python3/stdlib_module/locale
- tuts/python3/stdlib_module/locale/atof
- tuts/python3/stdlib_module/locale/currency
- tuts/python3/stdlib_module/locale/Error
- tuts/python3/stdlib_module/locale/format_string
- tuts/python3/stdlib_module/locale/getdefaultlocale
- tuts/python3/stdlib_module/locale/getencoding
- tuts/python3/stdlib_module/locale/getlocale
- tuts/python3/stdlib_module/locale/getpreferredencoding
- tuts/python3/stdlib_module/locale/localeconv
- tuts/python3/stdlib_module/locale/normalize
- tuts/python3/stdlib_module/locale/setlocale
- tuts/python3/stdlib_module/locale/str
- tuts/python3/stdlib_module/locale/strcoll
- tuts/python3/stdlib_module/locale/strxfrm
Related notes
- tuts/python3/stdlib_module/locale/atof Linked here; links to this page; shared tags: #locale, #stdlib
- tuts/python3/stdlib_module/locale/currency Linked here; links to this page; shared tags: #locale, #stdlib
- tuts/python3/stdlib_module/locale/Error Linked here; links to this page; shared tags: #locale, #stdlib
- tuts/python3/stdlib_module/locale/format_string Linked here; links to this page; shared tags: #locale, #stdlib
- tuts/python3/stdlib_module/locale Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/locale/getdefaultlocale links to this page; shared tags: #locale, #stdlib
- tuts/python3/stdlib_module/locale/getencoding links to this page; shared tags: #locale, #stdlib
- tuts/python3/stdlib_module/locale/getlocale links to this page; shared tags: #locale, #stdlib
- tuts/python3/stdlib_module/locale/getpreferredencoding links to this page; shared tags: #locale, #stdlib
- tuts/python3/stdlib_module/locale/localeconv links to this page; shared tags: #locale, #stdlib