Skip to content

Commit c49e8b2

Browse files
committed
Regex and Parsing 1
1 parent 6033e2c commit c49e8b2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Introduction to Regex Module
2+
# https://www.hackerrank.com/challenges/introduction-to-regex/problem
3+
4+
import re
5+
r = []
6+
for _ in range(int(input().strip())):
7+
r.append(bool(re.match(r'^[-+]?[0-9]*\.[0-9]+$', input().strip())))
8+
print(*r, sep = '\n')

0 commit comments

Comments
 (0)