Python
choueric
这个作者很懒,什么都没留下…
展开
-
Python中时间格式化
import timeformate = "%Y-%m-%d %H:%M:%S"formate1 = "%Y-%m-%d"print time.strftime(formate,time.localtime(time.time()))原创 2013-09-12 22:30:53 · 741 阅读 · 0 评论 -
Python判断字符串中是否有中文字符
#-*- coding:utf-8 -*-def is_chinese(s):rt = Falseif s>= u"\u4e00" and srt = Truereturn rtss = "中文测试測試請說ha".decode("utf-8")for row in ss:print row,is_chinese(row)原创 2013-11-27 10:17:07 · 5999 阅读 · 0 评论