+ 1

String methods

https://sololearn.com/compiler-playground/c27qcQIB6118/?ref=app What's the problem with find and count functions , why they're not working??

12th May 2024, 9:52 AM
Noob Coder 🥂
2 ответов
+ 7
Everything works properly. name.find("a") return the index of `a` in the string which is 0. And name.count("2") output 0 because the string does not contain "2".
12th May 2024, 10:31 AM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 2
Thanku so much Gulshan Mahawar 🙏🥂💖
12th May 2024, 3:00 PM
Noob Coder 🥂