"and or" are used for decision control(Boolean logic)
So if you want both first and second to run that will never work.

#both test conditions are true and it print
>>> a = 4
>>> if a > 3 and a < 10:
print 'this work'
this work
#if one is false it will not print
>>> if a > 3 and a > 10:
print 'this work'
#if we use "or" only one test conditions has to be true.
>>> if a > 3 or a > 10:
print 'this work'
this work

DEATHMASTER

9 Years Ago

I see how that works, a little more specifically I'm trying to use it in this which isn't working

Do not under any circumstances use 'input' as a variable name for your string! If you got the code from someone else, it is crap!

If you use 'input' as a variable name early on in your code, you cannot use the function input() later, because 'input' is now a key in the global dictionary and identifies a string object not a function.

DEATHMASTER

9 Years Ago

Ok I did precisely that (but app = array) ^ with input renamed to my_input and it still doesn't give the print statement.

At this point you need to give us the whole code, otherwise we will talk about some nebulous thing for ever.

I am not sure what -1 you are talking about.

Note:
Okay, now I see all those -1 in front of every newer thread (not post).
I looked into it and found out that it is associated with the up and down arrows that are a new feature here, and are supposed to be some kind of a flaky rating system.

It looks like some clown from the C forum who hates Python went around and down clicked all the authors of newer threads! The new feature is rather childish to say the least, so I apologize. I have requested for it to be removed.