[python]【练手向】24点问题的一个Python解
class mNum:
def __init__(self,num):
self.num = float(num)
self.str = "%s" % num
def eval(self,second,opera):
ret = mNum(0)
if opera == "+":
ret.num = self.num + second.num
elif opera =
原创
2015-03-26 20:18:05 ·
817 阅读 ·
0 评论