Python 学习笔记
def run():
print 'running...'
def execute(method):
method()
execute(run)
result:
running...
condition = False
test = 'yes, is true' if condition else 'no, is False'
print test
condition = True
test = 'yes, is true' if condition else 'no, is False'
print test
result:no, is False
yes, is true