Python“TypeError: 'NoneType' object is not iterable"的缘故

Python“TypeError: 'NoneType' object is not iterable"的原因

    本来不想说的,但是发现大家都遇到了该问题,由于该问题编译器提示较模糊,一般仅仅说for循环的参数没有定义,不能迭代。

具体如下截图:

    Python“TypeError: 'NoneType' object is not iterable"的缘故

    其实问题不是参数,而是我们在使用参数的过程中错误了,大家可以看图上的提示就能够明白,192。168。1。1/32和192。168。1。1/24的区别,请大家以后在python中遇到类似问题是不要慌张。