Комментарии:
Could you explain how to use 'self'? like in def xyz(self): ?
ОтветитьUseful and informative
ОтветитьUsing a book as an example.
The book is the iterable, the pages are the items in the iterable [ item1, item2 ].
You going through the pages is what is technically referred to as iterating.
So an iterator is what enables you to go through an iterable.
It is what allows you to go through the pages.
An iterable is a collection of items.
Python by default provides different types of iterators for each type of iterable, each iterator has it only unique benefits. You can create your own. Example: A generator object is an iterator.
Haha, the police
ОтветитьThank you 😊
ОтветитьThanks for knowledges.
Ответить🎉
Ответитьwhere do these fit in within python's built in data type hierarchy?
ОтветитьYou should have imported these from `collections.abc`, not `typing`. That's the modern way to do it
ОтветитьThanks
ОтветитьIs there a fork of Python that enforces annotations in "compile" time or in runtime?
ОтветитьHow to make any auto login script using combo list tips make a video please
ОтветитьIf you have 'Luigi', then why you don't have 'Mario'?
ОтветитьExcellent information!
Ответитьhmmm that seems very similar to generators. I have made generators before that says next(some_gen) to increment to the next item
Ответитьnice. I use generators by yielding. and I like making them infinite so there is no running out of elements. Won't throw an exception
ОтветитьHow luch faster is this than just
For i in range(len(list_)):
Print( list[i] )
Lol
too complicated , you start with a lot of data types and all sugary syntaxes. Could have just explained with the basic syntaxes.
ОтветитьThanks!
Ответить