Python do not use len as condition

Describes the cause and action for error messages.


Error Message(English):
do not use len as condition

Resolution


関連リンク


Why is the use of len(SEQUENCE) in condition values considered ...
https://stackoverflow.com/questions/43121340/why-is-the-use-of-lensequence-in-condition-values-consi・・・

In condition values...
https://stackoverflow.com/questions/43121340/why-is-the-use-of-lensequence-in-condition-values-consi・・・

python 条件値のlen(SEQUENCE)の使用がPylintで間違っていると考え ...
https://code.i-harness.com/ja-jp/q/291fabc

Add suggestion for `len-as-condition` message. ・ Issue #1405 ・ PyCQA ...
https://github.com/PyCQA/pylint/issues/1405

Python len() - Python Standard Library - Programiz
https://www.programiz.com/python-programming/methods/built-in/len

How to check if a list is empty in Python - Tutorialspoint
https://www.tutorialspoint.com/How-to-check-if-a-list-is-empty-in-Python

7. Strings ? How to Think Like a Computer Scientist: Learning with ...
http://www.openbookproject.net/thinkcs/python/english2e/ch07.html

While loop - Learn Python 3 - Snakify
https://snakify.org/en/lessons/while_loop/

Never use "for i in range(len(sequence)):" - Python Forum
https://python-forum.io/Thread-Basic-Never-use-for-i-in-range-len-sequence

Python | Check whether a list is empty or not - GeeksforGeeks
https://www.geeksforgeeks.org/python-check-whether-list-empty-not/



Name:
Comment:



[return to Python エラーコード一覧]