I'm making a project in which I'm trying to represent an arduous plate by means of code, something like, each pin has different characteristics (some can be analog or digital, others with pwm etc), I thought to do it with a dictionary in which each key is a pin and the value represents if the pin is in use (1=in use or 0 = not used), until that moment I have it clear, but the problem arises when I want to assign another characteristic such as if it is analog (a 1 in second position) or if it has PWM (the value of true), something like that:
dic =={1 : [0,0,True], 2 : [1,0,false], 3:[1,0,false], 4 [1,0,false], 5 : [1,0,false] ,6 : [1,0,false] }
a = dic.get(1)
print (a)
if I try to access it, I get something like:
[0,0,True]
is there a way to access only one feature? for example, to find out if the pin has PWM
I've been looking but can't find anything, I apologize if my English isn't very good but I'm not a native speaker.