5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Pythonのisnumeric()の挙動を知らなかった件

Posted at

はじめに

え!知らなかったデス😨
というわけで、いろいろな文字を調べてみました。

試した数値

真偽 備考 感情
"1".isnumeric() True 半角数字 😇
"1.2".isnumeric() False 半角数字小数 😇
"1".isnumeric() True 全角数字 😲
"一".isnumeric() True 漢数字 🧐
"壱".isnumeric() True 大字 🧐
"①".isnumeric() True 丸数字 🥹
"❶".isnumeric() True 丸数字(塗りつぶし) 🥹
"⑴".isnumeric() True カッコ数字 🥹
"Ⅰ".isnumeric() True ローマ数字 🥹
"¼".isnumeric() True 1/4 😱
"٧".isnumeric() True アラビア数字 😱

最後に

こんな文字もisnumeric()がTrueを返すよっていうのがありましたら、コメントで教えてください🤗

5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?