pythonのディ区ショなりのfor文わからないです。
サンプルプログラムはこれです
lang
1# -*- coding: utf-8 -*- 2 3test_list1 = {'year':2015,'month':2,'day':20} 4 5print test_list1 6 7print '------------' 8 9for i in test_list1: 10 print i 11 print test_list1[i] 12
このプログラムのiは何なんですか?要素の個数ですか?
そしてprint test_list1[i]はtest_list1の中から要素をろりだしてるんでしょうk?
いみ不です。どういう動きをsいてるのかおしえてください
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/02/15 03:40