Skip to content

Commit 0938e19

Browse files
committed
Update decode-ways.py
1 parent 66c36c8 commit 0938e19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/decode-ways.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def numDecodings(self, s):
2222
if len(s) == 0 or s[0] == '0':
2323
return 0
2424
prev, prev_prev = 1, 0
25-
for i in range(len(s)):
25+
for i in xrange(len(s)):
2626
current = 0
2727
if s[i] != '0':
2828
current = prev
@@ -33,4 +33,4 @@ def numDecodings(self, s):
3333

3434
if __name__ == "__main__":
3535
for i in ["0", "10", "10", "103", "1032", "10323"]:
36-
print Solution().numDecodings(i)
36+
print Solution().numDecodings(i)

0 commit comments

Comments
 (0)