You are viewing a single comment's thread. Return to all comments →
I believe this works well enough! As pythonic as I could make it.
import re N=int(input()) pattern=r"^[+-]?\d*\.\d+$" for i in range(N): num=input() print(bool(re.match(pattern, num)))
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 →
I believe this works well enough! As pythonic as I could make it.