Problem
Here's some code: test1.py. Download it and run it at the command line. You'll see it doesn't work. Open it up and have a look at it.
The whole algorithm relies on str.find()
finding the emoticon. Let's find the documentation for it and check it's up to the job.
Can you find the function in the documentation? Although the "Language Reference" (which describes the
core language) talks about strings,
it doesn't say much about the associated functions. For this, we need the "Library Reference". Can you find the methods associated with the
type str
(note, this is not the same as the string
library, which mainly deals with formating. In these methods, can you find
"find"?