Head First Python

Errata for Head First Python

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date Submitted
Safari Books Online 159
Multiple; error with "return"

In the following code: def search4vowels(word): """Return any vowels found in a supplied word.""" vowels = set('aeiou') found = vowels.intersection(set(word)) return found There are multiple suite versions of this where using "return" is expected to output the result. However, if "print" is not used in either: a) return print(found), ....or by properly calling the function, eg: b) print(search4voweles("whateverword")), there is no output. Simply returning the product does not produce any readable output. This can be quite, quite confusing until considered and modified.

Anonymous  Aug 16, 2019