Discuss / Python / 交作业

交作业

Topic source

loveprruy

#1 Created at ... [Delete] [Delete and Lock User]
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

L=['bart','lisa','adam']

#for循环
for Ls in L:
    print("hello,%s"%Ls)

#while循环
n=0

while n<len(L):
    print('hello,%s'%L[n])
    n=n+1

  • 1

Reply