Page 207 -
P. 207

comprehending data



                        Test Drive




                       It’s time for one last run of your program to confirm that your use of sets produces the same results
                       as your list-iteration code. Take your code for a spin in IDLE and see what happens.


































                                                                                  As expected, your latest
                                                                                  code does the business.
                                                                                  Looking good!






           Excellent!

           You’ve processed the coach’s data perfectly, while                  That’s great work, and just
           taking advantage of the sorted() BIF, sets,                         what I need. Thanks! I’m
           and list comprehensions. As you can imagine, you                    looking forward to seeing
           can apply these techniques to many different                        you on the track soon...
           situations. You’re well on your way to becoming a
           Python data-munging master!



                                                                                      you are here 4    171
   202   203   204   205   206   207   208   209   210   211   212