Skip to content

Commit aa896f4

Browse files
authored
Update multiply-strings.py
1 parent 88d92d2 commit aa896f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/multiply-strings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def multiply(self, num1, num2):
1616
result[i+j+1] %= 10
1717
for i in xrange(len(result)):
1818
if result[i]:
19-
return "".join(map(lambda x: str(x), result[i:]))
20-
return "0"
19+
break
20+
return "".join(map(lambda x: str(x), result[i:]))
2121

2222
# Time: O(m * n)
2323
# Space: O(m + n)

0 commit comments

Comments
 (0)