📅  最后修改于: 2022-03-11 14:46:42.336000             🧑  作者: Mango
import time
# bar is the var that loops
bar = [
" [= ]",
" [ = ]",
" [ = ]",
" [ = ]",
" [ = ]",
" [ =]",
" [ = ]",
" [ = ]",
" [ = ]",
" [ = ]",
]
i = 0
while thing_isnt_completed: # change loop if necessary
print(bar[i % len(bar)], end="\r")
time.sleep(.2) # time per frame
i += 1