Feb-18-2018, 01:16 PM
with respect I'm not sure you've understood. Perhaps I wasn't clear in my explanation.
If I could set
But:
Why would I want this to be
I'm learning Python, it seemed entirely reasonable to ask for clarification. I didn't consider it nonsense, I was trying to find out why I could not compare strings in a certain way. Anyway, thank you for you help because it still helped me clarify some ideas/thinking
If I could set
"rock" > "scissors"
and it meaningfully be True
(in the sense that I'd intended) I wouldn't have a problem. But since I cannot, I have been trying to understand why - basically to discover what's happening with string evaluation. I didn't consider this to be nonsense. You're not obliged to answer of course.But:
def assign(rock, paper, scissors): "rock" > "scissors" "scissors" > "paper" "paper" > "rock" return = True print("rock" > "scissors")gives me
False
Why would I want this to be
True
? Because as I stated in my original post, I was exploring ways of coding the problem that might be neater or more efficient than simply writing a lot of if "this thing" == "that thing": #do something or other
. Were it a problem using integers I'd be fine, but this is a word game. I'm learning Python, it seemed entirely reasonable to ask for clarification. I didn't consider it nonsense, I was trying to find out why I could not compare strings in a certain way. Anyway, thank you for you help because it still helped me clarify some ideas/thinking
