#coding:utf-8 def main(m): '''這個方法主要是用於過濾奇偶數, 若是是偶數,輸出good,不然輸出bad''' s='good ' if m%2==0 else 'bad' print s if __name__ == '__main__': main(4) # good main(5) # bad
版權聲明:本文爲博主原創文章,未經博主容許不得轉載。python