Dec-20-2018, 07:18 PM
(Dec-20-2018, 07:02 PM)Larz60+ Wrote: The problem with this is that there's two separate dictionaries needed, I'd like it to be self contained
Well, if you put them both in another dict (
company_data = {'values': company, 'aliases': company_aliases}
), your find_company function is simpler:def find_company(key): return company_data['values'][company_data['aliases'].get(key, key)]
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures