可爱的python课后习题(二)
1,结合grep的实例,考虑处理子目录的情况:
>>> a='12345'>>> 1 in aTraceback (most recent call last): File "<stdin>", line 1, in <module>TypeError: 'in <string>' requires string as left operand, not int>>> '1' in aTrue>>> a=(1,2,3,4)>>> 1 in aTrue>>> a=['1','2','3']>>> 1 in aFalse>>> '1' in aTrue>>> a={1:11,2:33}>>> 1 in aTrue