參考:

https://blog.51cto.com/u_16213393/8738744


isdecimal() 對數字的檢查要高於 isdigit()


isdecimal() 要求數字必須是十進制數。


python isdigit isdecimal函數用法_git