Only one carriage return (#2155)

* updating DIRECTORY.md

* touch

* fixup! Format Python code with psf/black push

* Update word_frequency_functions.py

* updating DIRECTORY.md

* Update word_frequency_functions.py

* Update lfu_cache.py

* Update sol1.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss
2020-06-25 19:15:30 +02:00
committed by GitHub
parent d2fa91b18e
commit 8ab84fd794
7 changed files with 77 additions and 68 deletions

View File

@ -28,9 +28,9 @@ def unique_prime_factors(n: int) -> set:
not the order in which it is produced.
>>> sorted(set(unique_prime_factors(14)))
[2, 7]
>>> set(sorted(unique_prime_factors(644)))
>>> sorted(set(unique_prime_factors(644)))
[2, 7, 23]
>>> set(sorted(unique_prime_factors(646)))
>>> sorted(set(unique_prime_factors(646)))
[2, 17, 19]
"""
i = 2
@ -64,7 +64,7 @@ def equality(iterable: list) -> bool:
>>> equality([2, 2, 2, 2])
True
>>> equality([1, 2, 3, 2, 1])
True
False
"""
return len(set(iterable)) in (0, 1)