diff options
Diffstat (limited to 'challenge-340/spadacciniweb/python/ch-2.py')
| -rw-r--r-- | challenge-340/spadacciniweb/python/ch-2.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/challenge-340/spadacciniweb/python/ch-2.py b/challenge-340/spadacciniweb/python/ch-2.py index 2aa0256c51..061f8199e2 100644 --- a/challenge-340/spadacciniweb/python/ch-2.py +++ b/challenge-340/spadacciniweb/python/ch-2.py @@ -32,7 +32,7 @@ import re def ascending_numbers(str): - numbers = re.findall(r'\d+', str) + numbers = list(map(int, re.findall(r'\d+', str) )) sorted = True if (len(numbers) > 0): @@ -41,6 +41,7 @@ def ascending_numbers(str): if (curr >= i): sorted = False break + curr = i print("'%s' -> %s" % ( str, sorted ) ) |
