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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!