mirror of
https://github.com/devenperez/leetcode.git
synced 2026-06-13 14:57:08 +00:00
4 lines
174 B
Python
4 lines
174 B
Python
class Solution:
|
|
def finalValueAfterOperations(self, operations: List[str]) -> int:
|
|
|
|
return sum(list(map(lambda x : 1 if x[1] == "+" else -1, operations))) |