diff options
Diffstat (limited to 'challenge-340')
| -rw-r--r-- | challenge-340/spadacciniweb/perl/ch-2.pl | 1 | ||||
| -rw-r--r-- | challenge-340/spadacciniweb/python/ch-2.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/challenge-340/spadacciniweb/perl/ch-2.pl b/challenge-340/spadacciniweb/perl/ch-2.pl index e22e5c7e24..3a302e6197 100644 --- a/challenge-340/spadacciniweb/perl/ch-2.pl +++ b/challenge-340/spadacciniweb/perl/ch-2.pl @@ -60,6 +60,7 @@ sub ascending_numbers { $sorted = 0; last; } + $curr = $_ } } 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 ) ) |
