You are viewing a single comment's thread. Return to all comments →
You can write the same as
return sum(s[i % len(s)] == 'a' for i in range(n))
But how efficient is it for ?
Repeated String
You are viewing a single comment's thread. Return to all comments →
You can write the same as
But how efficient is it for ?