Detect Floating Point Number

  • + 0 comments

    import re print(("True" if re.match(r'^[+-]?\d.\d+$', input().strip()) else "False" for _ in range(int(input()))), sep='\n')