发表于: 2017-11-10 16:22:58
1 958
今日完成内容:
list列表(extend(),append(),remove(),pop(),pop(2)),
for, while ,if...else
函数。
movies = [
"The Holy Grail",1975,"Terry Jones & Terry Gilliam",91,
["Graham Chapman",
["Michael Palin","John Cleese","Terry Gilliam","Eric Idle","Terry Jones"]]]
把上面list的嵌套item也全部打印出来。
def print_item(movie_list):
for each_item in movie_list:
if not isinstance(each_item,list):
print(each_item)
else:
print_item(each_item)
print_item(movies)
评论