#!/usr/bin/env python3 #-*- coding:utf-8 -*- L = ['Bart','Lisa','Adam'] for name in L: print(name)
NO.2
#!/usr/bin/env python3 #-*- coding:utf-8 -*- L = ['Bart','Lisa','Adam'] i = len(L) - 1 while i >= 0: print(L[2 - i]) i -= 1
python3 /home/linuxmint/文档/python_stu/homework.py
Bart Lisa Adam
Sign in to make a reply
LingByron
NO.1
NO.2
python3 /home/linuxmint/文档/python_stu/homework.py