On Thu, Nov 24, 2011 at 11:12 PM, Ossi Heinonen wrote:
> Hi again
>
> Could it be possible to use some sort of wildcard method in this one? Like
>
> verifiedValues['*P1*']
>
> or
>
> verifiedValues['?P1?']
>
> Just a thought that seems intuitive, but is it doable?
No, that won't work with a
On 25.11.2011 10:30, Jeff Hardy wrote:
On Thu, Nov 24, 2011 at 11:12 PM, Ossi Heinonen wrote:
Hi again
Could it be possible to use some sort of wildcard method in this one? Like
verifiedValues['*P1*']
or
verifiedValues['?P1?']
Just a thought that seems intuitive, but is it doable?
Hi Eyvind
That gives me
print verifiedValues[dict.keys(verifiedValues)[0]]
5.5 [mm]
Which is pretty damn exactly what I need! Thank you very much! The only
problem now is that the order of the keys seems a bit random but maybe I
can find some pattern for that.
Thanks again!
- Ossi
Hi,
Von: Ossi Heinonen
> That gives me
>
>print verifiedValues[dict.keys(verifiedValues)[0]]
>5.5 [mm]
>
>Which is pretty damn exactly what I need! Thank you very much! The only
>problem now is that the order of the keys seems a bit random but maybe I can
>find some pattern for that.
Probably the keys aren't actually strings but repr() has been
overridden. You could copy the dict with
dict((repr(key), verifiedValues[key]) for key in verifiedValues)
to get one like you expect (though it may add quotes around the key).
Or you can
print type(verifiedValues.keys()[0])
and see
What happens if you try the following?
print verifiedValues[dict.keys(verifiedValues)[0]]
Eyvind.
-Original Message-
From: [email protected] on behalf
of Ossi Heinonen
Sent: Thu 24.11.2011 09:54
To: [email protected]
Subject: [Iro