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]]

28th May 2021, 1:59 PM
Ceno Python
Ceno Python - avatar
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.
28th May 2021, 2:46 PM
Lothar
Lothar - avatar
+ 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.
28th May 2021, 2:08 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 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
28th May 2021, 2:14 PM
aspad🇮🇷
aspad🇮🇷 - avatar
+ 5
Did you understand???
28th May 2021, 2:20 PM
aspad🇮🇷
aspad🇮🇷 - avatar
+ 4
Arsen Lufo Homework questions are not allowed in discuss section, next time before asking similar question be sure you attach your attempt.
28th May 2021, 2:41 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 4
In this case aspad s solution is not completely what u need.
28th May 2021, 4:07 PM
Oma Falk
Oma Falk - avatar
+ 2
🌹🌹🌹🌹
28th May 2021, 2:21 PM
aspad🇮🇷
aspad🇮🇷 - avatar
+ 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
28th May 2021, 3:56 PM
Oma Falk
Oma Falk - avatar
+ 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
28th May 2021, 4:02 PM
Ceno Python
Ceno Python - avatar
+ 1
Lothar AKSHAY🇮🇳 I asked for idea and not for solution. But anyway. Feel ya
28th May 2021, 2:59 PM
Ceno Python
Ceno Python - avatar
0
AKSHAY🇮🇳 What's this?
28th May 2021, 2:14 PM
Ceno Python
Ceno Python - avatar
0
aspad yeahh it works ,thank you. Now I can understand 🤗🤗🤗...
28th May 2021, 2:20 PM
Ceno Python
Ceno Python - avatar