def is_number(n): is_number = True try: # v type-casting the number here as `complex`, instead of `float` num = complex(n) is_number = num == num except ...
確定! 回上一頁