Python メモ

文字列に変換

str(変数)

配列(リスト)


初期化

lists = []
list = ["taro","hanako"]

追加

lists.append("saito")

繰り返し

for l in lists:
    print l

よくあるインデックスをインクリメントしながらの繰り返し(idx=0から10)

for idx in Range(0, 10):
    print idx