Python 条件判断的缩写方法

2018-09-21 21:28

阅读:612

  return (1==1) ? is easy : my god //C#中的用法
其实,在Python中,是这样写的:
print (1==2) and Fool or Not bad
输出结果:
Not bad


评论


亲,登录后才可以留言!