Python Forum

Full Version: How do you check if something exists or doesn't in the conditions of an if?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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.