How would you write the following in Python?
if key < 1 or key > 34:
I’ve tried every way I can think of and am finding it very frustrating.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If
keyisn’t anintorfloatbut astring, you need to convert it to anintfirst by doingor to a
floatby doingOtherwise, what you have in your question should work, but
or
would be a bit clearer.