Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
time.sleep('2') TypeError: a float is required
我该如何解决?我不确定我应该在这里做什么。
您正在传递一个字符串(一个字符"2")。传递一个数字:
"2"
time.sleep(2)