Discuss / Python / 打卡来啦

打卡来啦

Topic source

汐汐异星

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

#三种方法

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

for i in L:

    print('Hello, '+i+'!')

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

for i in L:

    print('Hello, %s!'%i)

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

for i in L:

    print('Hello, {0}!'.format(i))  

#死循环

 n=5

 while(n>0):

     print(n)


  • 1

Reply