Originally Posted by
isaidilytd
I don't want two errors
You have a bunch of tests like:
Code:
if (something)
print(message)
if (otherthing)
print(message)
When more than one of the something/otherthing conditions are true, you will get more than one message.
To avoid this, use if/else if/else if/.../else for your tests. That way the branches will be exclusive of each other and only one of them will print a message.
Code:
if (something)
print(message)
else if (otherthing)
print(message)
else
print("all ok");