Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

If statement based on if a file is present.

$
0
0
Hi, I'm having trouble writing an if statement, where the condition is if a file is input by the tool's user. For example, I thought the syntax was:
Code:

if file == True:
    The do stuff

But it's not working correctly. Advice? I think this is an embarrassing easy thing to do, I'm just not sure what the right syntax is.
Thanks,
Scott

Viewing all articles
Browse latest Browse all 2485

Latest Images

Trending Articles