Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
In Python which is better to use dictionary or lists?
+2
votes
asked
Jul 3, 2019
by
Danny
Please
log in
or register to answer this question.
4 Answers
0
votes
answered
Jul 16, 2019
by
aravind
(
140
points)
based on our requriment we will use dict or list
dict is data type which contain key:value
but list contains only values
both are mutable
Please
log in
or register to add a comment.
0
votes
answered
Jul 18, 2019
by
Randhir Gurjar
in python both are good at the respective places but dictionary in terms options is generally considered better.
Please
log in
or register to add a comment.
0
votes
answered
Jul 18, 2019
by
DEEPAK kumar
(
140
points)
best dictionary
Please
log in
or register to add a comment.
0
votes
answered
Jul 21, 2019
by
sahdev
(
180
points)
It will depend on what you want them for. For example to create a binary tree you can use list, but for graph a dict is more suitable.
Dict in very simple way is used as a hash table as well.
Please
log in
or register to add a comment.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...