首页 > 编程语言 > 详细

Learn Python From 'Head First Python' [1] : The List

时间:2014-09-07 21:00:15      阅读:296      评论:0      收藏:0      [点我收藏+]

1.the concept of List

2. how to define a method of myself

3.how to iterator a list

 

PS:

for Step 2,3. it is related with a key word: ‘def‘. we define a function like below.

def function name:

  XXXXX

e.g. list iterator :

1 def print_lol(the_list):
2     for each in the_list:
3         if isinstance(each,list):
4             print_lol(each)
5         else:
6             print(each)

 

Learn Python From 'Head First Python' [1] : The List

原文:http://www.cnblogs.com/zhuojiniao/p/3960548.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!