
Python
smalltt
enjoy life, enjoy programming
展开
-
how to use String.strip()
Description The method strip() returns a copy of the string in which all chars have been stripped from the beginning and the end of the string (default whitespace characters). Syntax Following is t转载 2013-04-30 17:55:59 · 653 阅读 · 0 评论 -
how to clear screen in python
If you mean the screen where you have that interpreter prompt >>> , you can do CNTL-L on Bash shell can help. Windows does not have equivalent. You can do import os os.system('cls') #on wind原创 2013-04-30 01:46:14 · 588 阅读 · 0 评论 -
find out all attributes of an object
for example: #create a complex data object >>> complex_data=1+1j #find out all attributes of complex_data using method dir() >>> dir(complex_data) ['__abs__', '__add__', '__class__', '__coerc原创 2013-05-01 00:27:14 · 543 阅读 · 0 评论 -
关键字匹配之BF算法-python实现
关键字匹配之BF算法原创 2013-07-04 10:00:10 · 3856 阅读 · 0 评论