2011. Final Value of Variable After Performing Operations Updated: 2024-03-12 1 min read Algorithms , LeetCode On This PageLeetCode problem 2011class Solution: def finalValueAfterOperations(self, operations: List[str]) -> int: return sum(1 if s[1] == '+' else -1 for s in operations)