Discuss / Python / MYH: while + format()

MYH: while + format()

Topic source

master_Hang

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

L = ['Bart', 'Lisa', 'Adam']

i = 1

while i > 0:

    print('hello,{0}\nhello,{1}\nhello,{2}'.format(L[0],L[1],L[2]))

    i -= 1


  • 1

Reply