我已经在一个项目上工作了大约五分钟,但我遇到了一个错误:
TypeError:“str”对象不可调用。
谁能帮我看看我的错误?
from win10toast import ToastNotifier as tst
import time
#timer with notifications
toaster = tst()
#the below input shows how long the timer will last
span_seconds = input('How many seconds will your timer span through? ')
#loops the time until the seconds are up
i = 0
while i < span_seconds():
time.sleep(1)
span_seconds-1
#determines whether the timer is done
if i == span_seconds:
toaster.show_toast('Timer is up!')