Python Forum
How do you check if something exists or doesn't in the conditions of an if? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: How do you check if something exists or doesn't in the conditions of an if? (/thread-6961.html)



How do you check if something exists or doesn't in the conditions of an if? - Klar - Dec-15-2017

Title says it all. How? I would look it up in the Python Docs, but I got the HTML version, not the .pdf version, and I can't figure out how to search.


RE: How do you check if something exists or doesn't in the conditions of an if? - sparkz_alot - Dec-15-2017

You could use the online docs at Python Documents.

Not sure what you mean by "something" you mean like a file? The result of an 'if' statement will result in it being either True or False, depending on how you present the comparison. You might want to give an example of what you are trying to do.