mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
Pyupgrade to Python 3.9 (#4718)
* Pyupgrade to Python 3.9 * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -19,7 +19,7 @@ class HashTable:
|
||||
return self._keys
|
||||
|
||||
def balanced_factor(self):
|
||||
return sum([1 for slot in self.values if slot is not None]) / (
|
||||
return sum(1 for slot in self.values if slot is not None) / (
|
||||
self.size_table * self.charge_factor
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user