もっと詳しく

連載目次 関数定義の基本型 # パラメーターがなく、戻り値もない関数 def helloworld(): print(‘hello world’) helloworld() # hello world # パラメーターがなく、戻り値がある関数 from datetime import datetime def get_now(): return datetime.now().strftime(‘%Y/%m/%d %H:%M:%S’) result = get_…