You are viewing a single comment's thread. Return to all comments →
import re def is_float_string(s:str): reg_ex = r'^(\+|-?)\d*\.\d+$' match = re.match(reg_ex, s) return match != None number_of_tests = int(input()) for i in range(number_of_tests): input_str = input() print(is_float_string(input_str))
Seems like cookies are disabled on this browser, please enable them to open this website
Detect Floating Point Number
You are viewing a single comment's thread. Return to all comments →