0
I have no idea 👉👈
"Create a function that takes a dictionary and returns the keys and values as separate list. Return the keys sorted alphabetically, and theirs corresponding values in the same order. Examples: keys_and_values ({"a" : 1, "b" : 2, "c" : 3}) --> [["a", "b", "c"], [1, 2, 3]]
12 Respuestas
+ 9
aspad ,
please help us to keep sololearn what it is made for: It is a self-learning platform.
So this means, that we should avoid giving codes when people ask for this, before they have done a try by themselves and before they have present it here. It looks really helpful when you post a code as you did, but it does not help the OP. This will be a copy and paste - and the coding skills and problem solving ability will not grow.
What we should do is to give hints or comments how to solve the task.
Thanks for your understanding.
+ 6
www.homeworkquestions.com
Here you will get all the codes without showing your attempt.
To ask a question in SoloLearn discuss section, YOU HAVE TO POST YOUR ATTEMPT/CODE.
+ 5
dic = {'a':3,'c':2,'b':9}
key = list(dic.keys())
value = list(dic.values())
k = sorted(key)
v = sorted(value)
print(k)
print(v)
i think its ok
+ 5
Did you understand???
+ 4
Arsen Lufo Homework questions are not allowed in discuss section, next time before asking similar question be sure you attach your attempt.
+ 4
In this case aspad s solution is not completely what u need.
+ 2
🌹🌹🌹🌹
+ 2
Arsen Lufo are u sure,it is what you wanted?
What do you expect here as output for keys?
keys_and_values ({"a" : 2, "b" : 1, "c" : 3})
1,2,3 or 2,1,3
+ 2
Frogged 2,1,3 becouse u did't use 'sorted'...
Im learning... and sometimes the asnswer helps you to get the solution by yourself. While I use different situations and problems. Im here to learn and I will
0
AKSHAY🇮🇳 What's this?
0
aspad yeahh it works ,thank you. Now I can understand 🤗🤗🤗...