mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-31 06:33:44 +00:00
syntax error in dict comprehension
This commit is contained in:
parent
483a2a0ab2
commit
174ce08c73
|
@ -30,8 +30,8 @@ because both hash functions return the same value
|
||||||
|
|
||||||
Not added elements should return False ...
|
Not added elements should return False ...
|
||||||
>>> not_present_films = ("The Goodfather", "Interstellar", "Parasite", "Pulp Fiction")
|
>>> not_present_films = ("The Goodfather", "Interstellar", "Parasite", "Pulp Fiction")
|
||||||
>>> {film: bloom.format_hash(film) for film in not_present_films)}
|
>>> {film: bloom.format_hash(film) for film in not_present_films}
|
||||||
{'The Goodfather': '00011000', 'Interstellar': '00000011', 'Parasite': '00010010': 'Pulp Fiction': '10000100'}
|
{'The Goodfather': '00011000', 'Interstellar': '00000011', 'Parasite': '00010010', 'Pulp Fiction': '10000100'}
|
||||||
>>> any(film in bloom for film in not_present_films)
|
>>> any(film in bloom for film in not_present_films)
|
||||||
False
|
False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user