How do you sort a list of numbers in python?



How do you sort a list of numbers in python?..

Answer / Dilip Kumar Dube

You can use the built-in `sort()` function or the `sorted()` function to sort a list of numbers in Python. For example, `my_list.sort()` sorts the list `my_list` in place, while `sorted(my_list)` returns a new sorted list.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

Why does python use self?

1 Answers  


What is a dictionary in python programming?

1 Answers  


What is __ pycache __?

1 Answers  


How will you remove the last object from a list?

1 Answers  


What is the interactive mode?

1 Answers  


What is __ doc __ in python?

1 Answers  


What is the word for 6 times?

1 Answers  


What is the most popular ide for python?

1 Answers  


Is python too slow?

1 Answers  


Whats the difference between input() and raw_input()?

1 Answers  


Is it easy to learn python?

1 Answers  


Who built the sphinx?

1 Answers  


Categories