Skip to content

Commit

Permalink
shorter if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad Abtahi committed Sep 6, 2022
1 parent b5f3810 commit 8ce1f1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ def addNumbers(firstNumber, secondNumber):
for n in range(len(maxLen)):
outNum.append(maxLen[n])
outNum[n] += minLen[n]
if carry == True:
if carry:
outNum[n] += 1
carry = False
if outNum[n] > 9:
outNum[n] -= 10
carry = True

if carry == True :
if carry:
outNum.append(1)


Expand Down

0 comments on commit 8ce1f1d

Please sign in to comment.