Simplify the declarations of the Python code.

This commit is contained in:
krahets
2023-05-22 22:03:57 +08:00
parent 081b76d620
commit e196962d0a
27 changed files with 88 additions and 87 deletions

View File

@ -53,7 +53,7 @@ class ArrayQueue:
def to_list(self) -> list[int]:
"""返回列表用于打印"""
res: list[int] = [0] * self.size()
res = [0] * self.size()
j: int = self.__front
for i in range(self.size()):
res[i] = self.__nums[(j % self.capacity())]