自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 检查出一个文件夹下所有文件和文件夹,并把最后修改日期为今天一天之前的删掉

#coding=UTF-8import os.pathimport timeimport shutilimport datetimeif __name__ == '__main__':    ttime = time.strftime("%Y-%m-%d", time.localtime())    ytime = datetime.datetime.strptime(

2017-07-27 13:33:47 1556

转载 python练习实例14,题目:将一个正整数分解质因数。例如:输入90,打印出90=2*3*3*5。

def reduceNum(n): print '{}='.format(n) if not isinstance(n, int) or n 0: print '请输入一个正确的数字!' elif n in [1]: print '{}'.format(n) while n not in [1]: for i in xrange(

2017-07-12 11:03:21 2158

转载 14. Longest Common Prefix

class Solution(object):    def longestCommonPrefix(self, strs):        if len(strs)==0:            return ""        result=""             s_len=len(strs[0])        for l in strs:     

2017-06-26 15:50:29 245

原创 13. Roman to Integer

class Solution(object):    def num(self,x):        if x=='I':            return 1        if x=='V':            return 5        if x=='X':            return 10        if x=='L':     

2017-06-26 11:46:34 203

原创 9. Palindrome Number

class Solution(object):    def isPalindrome(self, x):        """        :type x: int        :rtype: bool        """        y=list(str(x))        l=len(y)        sign=1        for i i

2017-06-26 10:16:00 189

转载 Python学习:正则表达式

#!/usr/bin/pythonimport reline = "Cats are smarter than dogs"matchObj = re.match(r'(.*) are (.*?) (.*) (.*)', line, re.M|re.I)if matchObj:   print "matchObj.group() : ", matchObj.group()

2017-06-24 15:01:26 274

原创 2.reverse

ME:class Solution(object):    def reverse(self,x):            answer = 0            sign = 1 if x > 0 else -1            x = abs(x)            if x==0:                return 0         

2017-06-24 13:53:23 289

原创 1.twoSum

ME:class Solution(object):    def twoSum(self, nums, target):            for i in range(len(nums)):                for j in range(i+1,len(nums)):                    t = nums[i]+nums[j]

2017-06-24 13:50:22 215

原创 刚刚入职,以后在这记录学习笔记呀

刚刚入职,以后在这记录学习笔记呀!

2017-05-10 17:15:17 362

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除