+ 2

What will be the output... please tell me?

list=['suzuki', 'subaru', 'honda', 'maruti'] list.sort(reverse=True) print(list[3])

25th Sep 2020, 7:22 AM
Sumit Kumar
Sumit Kumar - avatar
11 Antworten
+ 4
Sümît Kåßhyåp You have received a good answer from Gogireddy Kavya, but I don't understand why you couldn't test this for yourself. It took me less time to test your code than to write this response. Remember, you will learn faster if you prove a function through your own attempt, than if you just ask for an answer to a question. (Homework?)
25th Sep 2020, 7:46 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 3
If indentation error is not considered the answer is honda. Because, first when we specify that reverse = true in sort . The meaning is that we are sorting the list in reverse order.
25th Sep 2020, 7:25 AM
Kavya
Kavya - avatar
+ 2
thank you Rik Wittkopp
25th Sep 2020, 7:51 AM
Kavya
Kavya - avatar
+ 2
Rik Wittkopp , I have tried for myself and I find error. I posted this question here. What is the problem in this..?
25th Sep 2020, 8:18 AM
Sumit Kumar
Sumit Kumar - avatar
+ 2
Sümît Kåßhyåp I am glad you tried for yourself, but your question did not indicate this and your code worked fine. As such, I assumed you had not made an effort at self learning. Please accept my apologies
25th Sep 2020, 8:26 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
25th Sep 2020, 8:33 AM
Kavya
Kavya - avatar
+ 1
Sümît Kåßhyåp Is the problem resovled?
25th Sep 2020, 8:20 AM
Kavya
Kavya - avatar
+ 1
Gogireddy Kavya yaa, Thank you so much for this.....
25th Sep 2020, 8:22 AM
Sumit Kumar
Sumit Kumar - avatar
+ 1
then please upvote my answer
25th Sep 2020, 8:22 AM
Kavya
Kavya - avatar
+ 1
Gogireddy Kavya already I have done it....
25th Sep 2020, 8:25 AM
Sumit Kumar
Sumit Kumar - avatar
0
Rik Wittkopp Sorry how can I accept it? I had tried it for myself firstly. So why will I tell lie from you?
25th Sep 2020, 8:28 AM
Sumit Kumar
Sumit Kumar - avatar