Question: I need help figuring out what is wrong with my code. SCENARIO: Sort short_names in reverse alphabetic order. Sample output with input: 'Jan Sam Ann
I need help figuring out what is wrong with my code.
SCENARIO:
Sort short_names in reverse alphabetic order.
Sample output with input: 'Jan Sam Ann Joe Tod'
['Tod', 'Sam', 'Joe', 'Jan', 'Ann']
MY CODE:
user_input = input()
short_names = user_input.split()
short_names.list.reverse()
print(short_names)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
