September 2013
Intermediate to advanced
350 pages
9h 38m
English
Here are some exercises for you to try on your own. Solutions are available at http://pragprog.com/titles/gwpy2/practical-programming.
In the Python shell, execute the following method calls:
Using string method count, write an expression that produces the number of o’s in ’tomato’.
Using string method find, write an expression that produces the index of the first occurrence of o in ’tomato’.
Using string method find, write a single expression that produces the index of the
Read now
Unlock full access