How to determine if a Python 🐍 object is iterable 🔄 #shorts

preview_player
Показать описание
Use duck typing and EAFP principles to test if something is an iterable by trying to run iter on the object.
Рекомендации по теме
Комментарии
Автор

Ok we learned how to determine if a python object is iterable. Now how to determine if it is a duck?

sinan_islam
welcome to shbcf.ru