June 2017
Beginner
352 pages
8h 39m
English
The membership tests for dictionaries using the in and not in operators work on the keys:
>>> symbols = dict(... usd='\u0024', gbp='\u00a3', nzd='\u0024', krw='\u20a9',... eur='\u20ac', jpy='\u00a5', nok='kr', hhg='Pu', ils='\u20aa')>>> symbols{'jpy': '¥', 'krw': '₩', 'eur': '€', 'ils': '₪', 'nzd': '$', 'nok': 'kr', 'gbp': '£', 'usd': '$', 'hhg': 'Pu'}>>> 'nzd' in symbolsTrue>>> 'mkd' not in symbolsTrue
Read now
Unlock full access