Algunos de los métodos de string se cubren en el conjunto 3 a continuación
Métodos de string Parte-1
Más métodos se discuten en este artículo
# Python code to demonstrate working of # len() and count() str = "geeksforgeeks is for geeks" # Printing length of string using len() print (" The length of string is : ", len(str)); # Printing occurrence of "geeks" in string # Prints 2 as it only checks till 15th element print (" Number of appearance of ""geeks"" is : ",end="") print (str.count("geeks",0,15))
Publicación traducida automáticamente
Artículo escrito por GeeksforGeeks-1 y traducido por Barcelona Geeks. The original can be accessed here. Licence: CCBY-SA