Detect Floating Point Number

  • + 0 comments
    import re
    for i in range(int(input())):
        number = input()
        print(bool(re.search('^[+-]?[0-9]{0,}\.[0-9]+[^A-Z]?$', number)))