Re: [Tutor] How to show dictionary item non present on file

2014-07-22 Thread Peter Otten
jarod...@libero.it wrote: > Hin there!!! > > I have a niave question on dictionary analysis: > If you have a dictionary like this: > diz > Out[8]: {'elenour': 1, 'frank': 1, 'jack': 1, 'ralph': 1} > > and you have a list and you want to know which keys are not present on my > dictionary the cod

Re: [Tutor] How to show dictionary item non present on file

2014-07-22 Thread Steven D'Aprano
On Tue, Jul 22, 2014 at 01:10:18PM +0200, jarod...@libero.it wrote: > But I havethis problem I have a file and I want to know which elements are > not > present on my file from dictionary. > more data.tmp > jack 1 > pippo 1 > luis 1 > frate 1 > livio 1 > frank 1 > > > with open("data.tmp")

[Tutor] How to show dictionary item non present on file

2014-07-22 Thread jarod...@libero.it
Hin there!!! I have a niave question on dictionary analysis: If you have a dictionary like this: diz Out[8]: {'elenour': 1, 'frank': 1, 'jack': 1, 'ralph': 1} and you have a list and you want to know which keys are not present on my dictionary the code are simple. for i in diz.keys(): ...: