Discuss / Python / 交作业 方案1

交作业 方案1

Topic source

报三春晖

#1 Created at ... [Delete] [Delete and Lock User]

-- coding: utf-8 --

L = ['Bart', 'Lisa', 'Adam'] for name in L: print('Hello',name)

iSilent94021

#2 Created at ... [Delete] [Delete and Lock User]

这样出来的答案都是 Hello Bart 最后一行应该修改为print('Hello, %s!' % name)

2

朋友建议你试着运行下再说对不对 不需要格式化输出


  • 1

Reply