Postfix calculator in python