I have this simple line of code:
i = \" \"
if i != \"\" or i != \" \":
print(\"Something\")
This should be simple, if i is not empty <
I will explain how or
works.
If checks the first condition and if it is true it does not even check for the second condition.
If the first condition is false only then it checks for second condition and if it is true the whole thing becomes true.
Because
A B Result
0 0 0
0 1 1
1 0 1
1 1 1
So If you want to satisfy both condition of not empty and space use and