We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Strings
- Find a string
- Discussions
Find a string
Find a string
Sort by
recency
|
3438 Discussions
|
Please Login in order to post a comment
It really tests your understanding of slicing and string traversal. If you're practicing for interviews or just want to strengthen your Python basics, Gurubhai247
string.count(sub_string) why this logic gives only 1
def count_substring(string, sub_string):