cdactvm commited on
Commit
91052f5
·
verified ·
1 Parent(s): 1029b3d

Update isNumber.py

Browse files
Files changed (1) hide show
  1. isNumber.py +9 -22
isNumber.py CHANGED
@@ -1,22 +1,9 @@
1
- #!/usr/bin/env python
2
- # coding: utf-8
3
-
4
- # In[1]:
5
-
6
-
7
- # Function to check if the string is a number
8
- def is_number(x):
9
- if type(x) == str:
10
- x = x.replace(',', '')
11
- try:
12
- float(x)
13
- except:
14
- return False
15
- return True
16
-
17
-
18
- # In[ ]:
19
-
20
-
21
-
22
-
 
1
+ # Function to check if the string is a number
2
+ def is_number(x):
3
+ if type(x) == str:
4
+ x = x.replace(',', '')
5
+ try:
6
+ float(x)
7
+ except:
8
+ return False
9
+ return True