Dictionary checking

Kragen Sitaker kragen at pobox.com
Tue May 28 18:04:29 EDT 2002


Bjørn Ove Grøtan  <bgrotan at stud.ntnu.no> writes:
> I'm building a dictionary with values from a file.
> 
> for each key, I have an ID, Name and Alias
> some keys I have only ID and Name, some keys with
> ID and Alias, some keys with all 3 and a few keys
> with only a ID with no Name and no Alias.

So your file looks something like this?
JKJ30 id=foo name=bar alias=baz
JKJ31 id=quux name=blort
JKJ32 id=bloozie alias=znap

> How can I check if Name and/or Alias contain anything. 

Well, that depends on your file format and your internal
representation.




More information about the Python-list mailing list