1
activity = ["上山去砍柴","开车去东北","最爱打游戏"]
for i in range(3):
print("小明,10岁,男,"+activity[i])
print("")
for i in range(3):
print("老李,90岁,男,"+activity[i])
2
name = ['小明', '老李']
age = ['10岁', '90岁']
sex = ['男']
activity = ["上山去砍柴", "开车去东北", "最爱打游戏"]
def func(a,b,c):
print("{},{},{},{}".format(name[a],age[b],sex[0],activity[c]))
for i in range(3):
func(0,0,i)
print("")
for i in range(3):
func(1,1,i)