forked from devAmoghS/Python-Interview-Problems-for-Practice
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit 5625194
authored
Fix has_only_digits.py
The previous code only counted how many characters where in the string and then compared to its length, always returning True, it didn't matter if it had letters or not.
I'm proposing this code as a solution to the problem.1 parent a6331e3 commit 5625194
1 file changed
+11
-13
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | - | ||
1 | + | ||
2 | 2 |
| |
3 | 3 |
| |
4 | - | ||
5 | - | ||
6 | - | ||
7 | - | ||
8 | - | ||
9 | - | ||
10 | - | ||
11 | - | ||
12 | - | ||
13 | - | ||
14 | - | ||
15 | - | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
16 | 11 |
| |
17 | 12 |
| |
18 | 13 |
| |
14 | + | ||
15 | + | ||
16 | + |
0 commit comments