From 82e1a3a68084c571d92b1f2183e33fcffbdb5195 Mon Sep 17 00:00:00 2001 From: Deven <63876261+devenperez@users.noreply.github.com> Date: Sat, 14 Jan 2023 20:25:32 -0500 Subject: [PATCH] Time: 61 ms (55.03%), Space: 13.8 MB (52.98%) - LeetHub --- .../2011-final-value-of-variable-after-performing-operations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2011-final-value-of-variable-after-performing-operations/2011-final-value-of-variable-after-performing-operations.py b/2011-final-value-of-variable-after-performing-operations/2011-final-value-of-variable-after-performing-operations.py index 89d0aa1..a441b3a 100644 --- a/2011-final-value-of-variable-after-performing-operations/2011-final-value-of-variable-after-performing-operations.py +++ b/2011-final-value-of-variable-after-performing-operations/2011-final-value-of-variable-after-performing-operations.py @@ -3,7 +3,7 @@ class Solution: value = 0 for op in operations: - if "+" in [op[0], op[-1]]: + if op[1] == "+": value += 1 else: value -= 1