mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-07 23:04:55 +08:00
refactor: Follow the PEP 585 Typing standard (#439)
* Follow the PEP 585 Typing standard * Update list.py
This commit is contained in:
@ -4,16 +4,11 @@ Created Time: 2022-11-29
|
||||
Author: Peng Chen (pengchzn@gmail.com)
|
||||
"""
|
||||
|
||||
import sys, os.path as osp
|
||||
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))
|
||||
from modules import *
|
||||
|
||||
|
||||
""" Driver Code """
|
||||
if __name__ == "__main__":
|
||||
""" 初始化栈 """
|
||||
# Python 没有内置的栈类,可以把 list 当作栈来使用
|
||||
stack: List[int] = []
|
||||
stack: list[int] = []
|
||||
|
||||
""" 元素入栈 """
|
||||
stack.append(1)
|
||||
|
Reference in New Issue
Block a user