0

How to create a list

How to create a list with position showing a=4, b=5, c=10 and after a typing "a" code will print 4, if "b" than 5.

17th Feb 2021, 7:08 PM
Konrad Dupala
Konrad Dupala - avatar
3 Respostas
+ 6
Konrad Dupala , not sure what language you are talking about. what you mean is called dictionary in python or map / hashmap in some other languages. so please be so kind and name the programming language. thanks!
17th Feb 2021, 7:19 PM
Lothar
Lothar - avatar
+ 1
Sorry, I'm new in here and new in programming. I was asking about python... will check dictionary later on.
17th Feb 2021, 8:47 PM
Konrad Dupala
Konrad Dupala - avatar
0
Use a dictionary.
17th Feb 2021, 7:19 PM
Hima
Hima - avatar