str.isnumeric() Numeric
Last updated: 2026-09-22
str.isnumeric() Numeric
str.isnumeric() returns True if non-empty and every char is a Unicode number (incl. CJK).
| Category | String Methods |
|---|---|
| Kind | Built-in Type Method |
| Python Version | all |
📝 Syntax
str.isnumeric()
Returns:bool. True if non-empty and every char is a Unicode numeric character.
Mutates the original:No (returns a new object)
▶ Example
Edit the code, press Run, and see the result in the output panel:
Output:
True
True
False
💡 Related Cases
More case studies coming soon — check back later.
❓ FAQ
QWhat is the difference between isnumeric() and isdigit()?
Aisnumeric() has the widest range and also includes Chinese numerals, Roman numerals, and so on: both '一二三'.isnumeric() and 'Ⅻ'.isnumeric() are True; isdecimal() is the narrowest, with isdigit() in between.
QWhat does an empty string return?
AFalse, because isnumeric() requires a non-empty string.
QCan isnumeric() tell whether a string can be passed to int()?
ANo. '一二三'.isnumeric() is True, but int('一二三') raises ValueError. isnumeric() only checks character properties; it does not mean the string is parseable.