Detect Floating Point Number

  • + 1 comment

    Most Easy to understood

    t=int(input())
    lis=[]
    for i in range(t):
        lis.append(input())
    
    for item in lis:
        try:
            if float(item):
                print(True)
            else:
                print(False)
        except:
            print(False)