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
|Safari Books Online
Multiple; error with "return"
In the following code:
"""Return any vowels found in a supplied word."""
vowels = set('aeiou')
found = vowels.intersection(set(word))
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:
there is no output. Simply returning the product does not produce any readable output. This can be quite, quite confusing until considered and modified.
||Aug 16, 2019