Python學習筆記 Part05--time庫的使用

時間獲取: time()--返回浮點數 ctime() --返回字符串 gmtime() --返回計算機可處理的時間格式 時間格式化: strftime(tpl,ts)  --time to string,其中tpl是格式化字符串,ts是計算機時間變量 strptime(str,tpl) --str to time,其中tpl是輸入格式,str是字符串 例子: 其中,格式化字符串的控制符有: 程序
相關文章
相關標籤/搜索