String is in the list, then fails to recognize itself as key

Hi all,

I’m building a quick one to shoot Product Codes into conduits based on Type (and dimensions).

We have a list of Types and Product Codes, so I’ve made a Dictionary from those, ask all present Conduits there Name, filter on those present in the Key list. So far so good.

Then the remaining elements go to the Dict and ask for their code, and all of a sudden I have 1 Type that reports it is not in the Key list.

I’ve renamed the Type, renamed both Type and entry in the Dict, restarted the whole test environment. Anybody have an idea what is happening here?

hello, you have 10 entries for the keys
and 9 entries for the values ​​in the constitution of the dictionary,
I am not certain that this is normal
(not sure of what I am saying, I am a beginner)

Cordially
christian.stan

2 Likes

Yes, your Key list is one item longer than your values list as @christian.stan stated.

2 Likes

Thank you both, I completely missed that. Must have deleted a value by accident copying those from the .txt I got send.

Duh.

1 Like