reubennott...@gmail.com writes: > [...] The following doesn't work. > > for fillempt in testdict: > if fillempt == 'filled': > print(testdict[fillempt])
This is equivalent to for fillempt in testdict: if fillempt == 'filled': print(testdict['filled']) which in turn can be optimized to if 'filled' in testdict: print(testdict['filled']) without knowing anything of the contents of tesdict. -- https://mail.python.org/mailman/listinfo/python-list