import datetime print(datetime.datetime.now().time()) 转载于:https://www.cnblogs.com/sea-stream/p/9975031.html