from time import sleep
def print_item2(alist):
for item in alist:
sleep(1) # 暂停1秒
print(item)
print_item2([2, 5, 6, 9, 8, 7])
2
<1秒>
5
<1秒>
6
<1秒>
9
<1秒>
8
<1秒>
7
from time import sleep
def print_item2(alist):
for item in alist:
sleep(1) # 暂停1秒
print(item)
print_item2([2, 5, 6, 9, 8, 7])
2
<1秒>
5
<1秒>
6
<1秒>
9
<1秒>
8
<1秒>
7