这个哪里出错了呀
Topic source梅尔加尼最后一行多此一举了,for in是将L中的内容逐个打印的
L = ['bart','lisa','adam'] for i in L: print('hello,',i)
输出结果: hello, bart hello, lisa hello, adam
- 1
梅尔加尼最后一行多此一举了,for in是将L中的内容逐个打印的
L = ['bart','lisa','adam'] for i in L: print('hello,',i)
输出结果: hello, bart hello, lisa hello, adam
F1shMAN-
L = ['Bart', 'Lisa', 'Adam']
a=['a','b','c']
for x in L:
for y in a:
print('hello,%s and %s'%y%x)