mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-19 10:48:58 +08:00
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:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user