摘要: Python中字符串处理的方法已经超过37种了,下面是一些常用的字符串处理的方法,以后慢慢添加。 阅读全文
posted @ 2016-04-26 15:58 sunny_2015 阅读(485) 评论(0) 推荐(0) 编辑
摘要: 191. Number of 1 Bits Total Accepted: 87985 Total Submissions: 234407 Difficulty: Easy Write a function that takes an unsigned integer and returns the 阅读全文
posted @ 2016-04-26 15:46 sunny_2015 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 342. Power of Four Total Accepted: 7302 Total Submissions: 21876 Difficulty: Easy Given an integer (signed 32 bits), write a function to check whether 阅读全文
posted @ 2016-04-26 15:00 sunny_2015 阅读(473) 评论(0) 推荐(0) 编辑
摘要: 344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". Subscri 阅读全文
posted @ 2016-04-26 13:29 sunny_2015 阅读(1591) 评论(0) 推荐(0) 编辑
摘要: os.path模块主要用于文件的属性获取,在编程中经常用到,以下是该模块的几种常用方法。更多的方法可以去查看官方文档:http://docs.python.org/library/os.path.html 1.os.path.abspath(path) 返回path规范化的绝对路径。 2.os.pa 阅读全文
posted @ 2016-04-26 10:40 sunny_2015 阅读(452) 评论(0) 推荐(0) 编辑