>>> L2 = [bb.lower() for bb in L1 if isinstance(bb,str)] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 1, in <listcomp> TypeError: isinstance() arg 2 must be a type or tuple of types
请教下为什么会这样呢。。
好吧,是因为,我自己不小心把str给赋值了!
Sign in to make a reply
aftersomanyyears
请教下为什么会这样呢。。