Page 92 -
P. 92

textual data



                              You need to update your price-grabbing program so that it extracts the four-character substring
                              that follows the occurence of the “>$” characters. Write the new version of your code in the
                              space provided.
                              Hints:  Don’t forget that the find() method finds the starting position of a substring. Once
                              you’ve found “>$”, use Python’s addition operator to calculate where in the string you want to
                              extract the substring. The addition operator is the “+” symbol.




                                                                 Search for this 2-character   you’re really
                                                                                             Here’s what
                                                                 combination.               looking for.




             coffee beans = <strong>$5.49</


             strong></p><p>Price valid for










































                                                                                        you are here 4    57
   87   88   89   90   91   92   93   94   95   96   97