What type hint should I use in Python 3 to describe an argument that I will use in these 3 ways:
if len(arg): ...for item in arg: ...if item in arg: ...You may use collections.abc.Collection
from collections.abc import Collection
def fn(arg: Collection[int]):
pass
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With