Skip to content

Commit fac68c9

Browse files
authored
Update solve-the-equation.py
1 parent 71c8e8e commit fac68c9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Python/solve-the-equation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ def solveEquation(self, equation):
3232
:type equation: str
3333
:rtype: str
3434
"""
35-
a, b = 0, 0
36-
side = 1
35+
a, b, side = 0, 0, 1
3736
for eq, sign, num, isx in re.findall('(=)|([-+]?)(\d*)(x?)', equation):
3837
if eq:
3938
side = -1

0 commit comments

Comments
 (0)