Feb-17-2018, 07:15 PM
Aha! Okay. Many thanks - I think I understand... if I have, I tried the following:
I'd like to understand what's going on here. Am I correct in thinking the function is designed to accept three inputs - those could be any type, correct? But by defining
Can I essentially force a string to be "greater than" another string by using a function (or any other means?).
def assign_order(str1, str2, str3): return str3 > str2 > str1 result = assign_order("c", "b", "a") print(result)and which prints
false
I'd like to understand what's going on here. Am I correct in thinking the function is designed to accept three inputs - those could be any type, correct? But by defining
result
to use strings something else then happens? Why otherwise would it return "false"?Can I essentially force a string to be "greater than" another string by using a function (or any other means?).