name 'List' is not defined-Python

前端 未结 1 1330
我寻月下人不归
我寻月下人不归 2021-01-29 11:10

I get this error when I run the code.How can I fix?

class Solution:    
def uniqueOccurrences(self, arr: List[int]) -> bool:
    d, counts = {}, {}
    for n          


        
相关标签:
1条回答
  • 2021-01-29 11:27

    Import it:

    from typing import List
    
    0 讨论(0)
提交回复
热议问题