Skip to content

Commit 6bd4b1f

Browse files
authored
Update evaluate_reverse_polish_notation.py
1 parent 2f7c413 commit 6bd4b1f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

evaluate_reverse_polish_notation.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
22

33
class Solution:
44
# @param {string[]} tokens The Reverse Polish Notation
@@ -28,4 +28,6 @@ def evalRPN(self, tokens):
2828
return 0 if not ret else ret[0]
2929

3030
def isOperator(self, item):
31-
return (item == '+') or (item == '-') or (item == '*') or (item == '/')
31+
return (item == '+') or (item == '-') or (item == '*') or (item == '/')
32+
33+
# medium: http://lintcode.com/zh-cn/problem/evaluate-reverse-polish-notation/

0 commit comments

Comments
 (0)