Py学习  »  公告

社区支持代码语法高亮

Py站长 • 10 年前 • 3312 次点击  

在你的代码最前面加上 :::python 即可将你的Python代码高亮

则结果是:

print "timestamp to time:"

timestamp = 1372759811

import time
print time.strftime('%Y-%m-%d %X', time.localtime(timestamp))

print "============================"

print "time to timestamp"

import datetime
dateC = datetime.datetime.now() 
timestamp = time.mktime(dateC.timetuple())
print "python timestamp:", timestamp

非常感谢 @欧阳宏宇 的建议

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/205
 
3312 次点击