大量使用if/elif/else将导致阅读和维护代码的困难。我建议您找到一个更好的解决方案,并附上意见,以便您能够理解:def biggest(a, b, c):
# Define a dictionary d with strings 'a','b','c' as keys to associate with values
d = {'a': a, 'b': b, 'c': c}
# Find the maximum value
maxValue = max(d.values())
# Gather all keys corresponding to max value into list
maxLetters = [k for k,v in d.items() if v == maxValue]
# Format and print the result
print("Biggest number is ", maxValue, " (", "=".join(maxLetters), ")", sep="")
biggest(1,2,3) # Biggest number is 3 (c)
biggest(1,2,2) # Biggest number is 2 (b=c)
biggest(2,2,2) # Biggest number is 2 (a=b=c)