import timefor i in range (100):print(“\r(:2)%”.format(i),end=“”)time.sleep(0.05)
format格式化时,占位符用{},不用%
有帮助的话,请点采纳该答案~