cdactvm commited on
Commit
52bb13c
·
verified ·
1 Parent(s): 62f70e1

Upload isNumber.py

Browse files
Files changed (1) hide show
  1. isNumber.py +22 -0
isNumber.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+