What is the difference between type-hinting a variable as an Iterable versus a Sequence?
I don't understand the difference when hinting Iterable and Sequence . What is the main difference between those two and when to use which? I think set is an Iterable but not Sequence , are there any built-in data type that is Sequence but not Iterable ? def foo(baz: Sequence[float]): ... # What is the difference? def bar(baz: Iterable[float]): ...