编程札记

P

Python3 字符串String Rfind 方法

Python3 字符串String Rfind 方法 #!/usr/bin/python3 str1 = "this is really a string example....wow!!!" str2 = "is" print (str1.rfind(str2)) print (str1.rfind(str2, 0, 10)) print (str1.rfind(str2, 10, 0)) print (str1.find(str2)) print (str1.find(str2, 0, 10)) print (str1.find(str2, 10, 0))

阅读全文 ↗
P

Python3 字符串String Max 方法

Python3 字符串String Max 方法 #!/usr/bin/python3 str = "this is a string example....really!!!" print ("Max character: " + max(str)) str = "this is a string example....wow!!!" print ("Max character: " + max(str))

阅读全文 ↗