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,880 points
72 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,780 points
321 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,080 points
89 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
382 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,000 points
112 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 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,259 views
0 votes
0 answers
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
145 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,930 points
105 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,930 points
61 views