摘要:
commonest = [1,2,2,2,1,3,4,5,1,1] print(commonest.count(1)) 阅读全文
posted @ 2017-11-28 15:16
Johnson_Yuan
阅读(7100)
评论(0)
推荐(0)
摘要:
转自 http://blog.csdn.net/yl2isoft/article/details/52079960 1.使用成员操作符 in 2.使用string模块的find()/rfind()方法 3.使用string模块的index()/rindex()方法 index()/rindex()方 阅读全文
posted @ 2017-11-28 15:14
Johnson_Yuan
阅读(148847)
评论(1)
推荐(2)
摘要:
# bytes object b = b"example" # str object s = "example" # str to bytes bytes(s, encoding = "utf8") # bytes to str str(b, encoding = "utf-8") # an alt 阅读全文
posted @ 2017-11-28 14:14
Johnson_Yuan
阅读(1826)
评论(0)
推荐(0)