On 18.03.2016 20:10, Palpandi wrote:
You can do like this.

if not my_iterable:
     <do something>
for x in my_iterable:
     <do something>

Thanks for you help here, however as already pointed out, my_iterable is not necessarily a list but more likely an exhaustible iterator/generator.

Best,
Sven
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to