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.
I would recommend s.count("a",0,n%len(s)) over slicing s. Slicing is not very efficient for very long strings. For 100-character strings will barely matter of course.
Repeated String
You are viewing a single comment's thread. Return to all comments →
I would recommend s.count("a",0,n%len(s)) over slicing s. Slicing is not very efficient for very long strings. For 100-character strings will barely matter of course.