Is there any built in sorted data structure in python

0 votes

Is there any built-in sorted data structure in python?

Nov 4, 2020 in Python by anonymous
• 8,870 points
772 views

1 answer to this question.

0 votes
Yes. List is sortable. Dict is also sortable. Just use:
>> d = [3, 5, 67, 325, 546]
>> d.sort()
>> d
[3, 5, 67, 325, 546]

You can also sort by default, no... but there are lists and you know you have to sort them after creating them.

answered Nov 4, 2020 by Richa sharma

Related Questions In Python

0 votes
1 answer

Is there a foreach function in python and is there a way to implement it if there isnt any

Every occurence of "foreach" I've seen (PHP, ...READ MORE

answered Aug 31, 2018 in Python by charlie_brown
• 7,720 points
1,179 views
0 votes
0 answers

Is there any module in Python that I can use for Wiki markup?

Hi all, simple question. Is there any ...READ MORE

Jan 22, 2019 in Python by Anirudh
• 2,090 points
628 views
0 votes
1 answer

Is there a way to list out in-built variables and functions of Python?

The in-built variables and functions are defined ...READ MORE

answered May 14, 2019 in Python by Junaid
2,233 views
0 votes
0 answers

Is there any console in python that is online and pluggable?

Is there some sort of online live ...READ MORE

Aug 13, 2019 in Python by Arvind
• 3,050 points
679 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,449 views
0 votes
1 answer
0 votes
1 answer

Is there a built-in module to handle excel files in python?

You can use the module - openpyxl ...READ MORE

answered Aug 19, 2019 in Python by Mohammad
• 3,230 points
837 views
0 votes
1 answer

How to check the value is double in the existing data that when ever the values are double print thats value

Hey, @There, I guess regarding your query you ...READ MORE

answered Nov 3, 2020 in Python by Gitika
• 65,770 points
856 views
0 votes
1 answer

What is selenium in python?

It is known as Web automations, It is ...READ MORE

answered Nov 4, 2020 in Python by Gitika
• 65,770 points
532 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP