[Python-de] Wie sieht Python fuer mich aus?

Thomas Orgelmacher trash at odbs.org
Mo Jan 9 12:41:50 EST 2017


Am 09.01.2017 um 17:33 schrieb Hermann Riemann:
[...]
>
> Verwenden tue ich eher den Typvergleich etwa:
> if type(variable)==type([]):
>    for elem in variable:
>        ..

"type(var) is list" oder ggf. "isinstance(var, list)"

-- 
I have seen things you lusers would not believe.  I've seen Sun
monitors on fire off the side of the multimedia lab. I've seen
NTU lights glitter in the dark near the Mail Gate. All these
things will be lost in time, like the root partition last week.



Mehr Informationen über die Mailingliste python-de