aboutsummaryrefslogtreecommitdiff
path: root/challenge-082/walt-mankowski/python/ch-2.py
diff options
context:
space:
mode:
authorWalt Mankowski <waltman@pobox.com>2020-10-17 18:27:06 -0400
committerWalt Mankowski <waltman@pobox.com>2020-10-17 18:27:06 -0400
commitba7a82cf5d113521a29b9f21a17c9fc9fbc5c922 (patch)
treef37c0a692ad7b16be594c6b09fc3def0da056ce3 /challenge-082/walt-mankowski/python/ch-2.py
parente0cea5b6dcbc43a547d1401d70335c6ba74ec0c8 (diff)
downloadperlweeklychallenge-club-ba7a82cf5d113521a29b9f21a17c9fc9fbc5c922.tar.gz
perlweeklychallenge-club-ba7a82cf5d113521a29b9f21a17c9fc9fbc5c922.tar.bz2
perlweeklychallenge-club-ba7a82cf5d113521a29b9f21a17c9fc9fbc5c922.zip
realized I didn't need $found in task 2
Diffstat (limited to 'challenge-082/walt-mankowski/python/ch-2.py')
-rw-r--r--challenge-082/walt-mankowski/python/ch-2.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/challenge-082/walt-mankowski/python/ch-2.py b/challenge-082/walt-mankowski/python/ch-2.py
index c9ef4de6f2..ca2a2d551d 100644
--- a/challenge-082/walt-mankowski/python/ch-2.py
+++ b/challenge-082/walt-mankowski/python/ch-2.py
@@ -4,23 +4,19 @@ def is_interleave(a, b, c):
if a == '' and b == '' and c == '':
return 1
- found = False
try:
if a[0] == c[0]:
- found = True
return is_interleave(a[1:], b, c[1:])
except IndexError:
pass
try:
if b[0] == c[0]:
- found = True
return is_interleave(a, b[1:], c[1:])
except IndexError:
pass
- if not found:
- return 0
+ return 0
a, b, c = argv[1:]