也就这样, - python杂记2 的评论 判断是否为数字isdigit()的话,里面不能有小数点。def is_number(s): try: n=str(float(s)) if n == "n... 1970-01-01T08:00:00+08:00 Typecho https://type.so/feed/atom/python/python-tips-1.html