Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • \$\begingroup\$ I had no idea Python strings had a count method... I don't suppose it's considered legit to change my answer to the question to use this new found knowledge? :p \$\endgroup\$ Commented Apr 10, 2014 at 7:16
  • \$\begingroup\$ @tal They don't. It's a method of a list, if you look closer \$\endgroup\$ Commented Apr 10, 2014 at 7:17
  • 1
    \$\begingroup\$ Oh, I see... but in an unexpected twist it turns out strings apparently have this method as well (in 3.x anyway) \$\endgroup\$ Commented Apr 10, 2014 at 7:22