Section 6.3, “Iterating with for Loops” - Dive Into Python

Section 6.3, “Iterating with for Loops” - Dive Into Python

瀏覽:1124
日期:2025-11-26
Example 6.8. Introducing the for Loop. >>> li = ['a', 'b', 'e'] >>> for s in li: 1 ... print s 2 a b e >>> print "\n".join(li) 3 a b e ......看更多