LoginSignup
1
1

More than 5 years have passed since last update.

HOKUSAI > Python > わたしの中では料理はできているの

Last updated at Posted at 2018-01-05
動作環境
ideone (Python3.5)

処理概要

@ ドラマ:ホクサイと飯さえあれば

わたしの中では料理はできているの

どういう処理をするかは自明なのでここでは書かない。

code

hokusai_180106.py
'''
v0.1 Jan. 06, 2018
  - replace keyword with text defined in the list
'''

# coding rule: PEP8

atxt = 'わたしの中では料理はできているの'

alist = ['コード', 'ソフト', 'ハード', '装置']
alist += ['アルゴリズム']
alist.remove('ハード')

for elem in alist:
    res = atxt.replace('料理', elem)
    print(res)

run
わたしの中ではコードはできているの
わたしの中ではソフトはできているの
わたしの中では装置はできているの
わたしの中ではアルゴリズムはできているの

コードの学習内容

  • list: 定義
  • list: 追加
  • list: 削除
  • string: 置換
  • iterator
  • 標準出力
  • (オプション) coding rule: PEP8

所感

「未完了のことは記憶に残る / 未完了の仕事は人の関心を奪い取る」

keijiroさんによる、かつて存在したRadium Software Development。
日々活動するエンジニアが様々な技法について検討する面白いブログだった。今はもう存在しない。

そのブログにおいて引用されていたフレーズ「未完了の仕事は人の関心を奪い取る」自体が頭に残っている。

ホクサイと飯さえあればのフレーズが未完了だったので、ここで完了とする。

link

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1