Python String Count Time Complexity Cheat