diff options
Diffstat (limited to 'progs/unparsable_programs/a158.py')
-rw-r--r-- | progs/unparsable_programs/a158.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/progs/unparsable_programs/a158.py b/progs/unparsable_programs/a158.py new file mode 100644 index 0000000..6e5fda0 --- /dev/null +++ b/progs/unparsable_programs/a158.py @@ -0,0 +1,5 @@ +def is_decimal(num):
+ import re
+ dnumre = re.compile(r"""^[0-9]+(\.[0-9]{1,2})?$""")
+ result = dnumre.search(num)
+ return bool(result)
\ No newline at end of file |