python 获取当前时间戳

 

#!/usr/bin/python
# -*- coding: UTF-8 -*-
import time;  # 引入time模块
ticks = time.time()
print("当前时间戳为:", ticks)

输出:
当前时间戳为: 1459994552.51

 

posted @ 2019-01-04 10:42  anobscureretreat  阅读(614)  评论(0编辑  收藏  举报