1. 定义一个print_lol函数来控制列表的缩进和写入位置 import sys """this is a new fuction, which work for a list""" def print_lol(the_list,indent=False,level=0,where=sys.stdout): """ one arguement is the_list""" for e…
1. Print them to screen man = [] other = [] try: data = open('sketch.txt') for each_line in data: try: (role, line_spoken) = each_line.split(':',1) line_spoken=line_spoken.strip() if role== 'Man': man.append(line_spoken) elif role == 'Other Man': oth…