grab dict keys/values without iterating ?!

T

Tamer Higazi

Hi people!

Is there a way to get dict by search terms without iterating the entire
dictionary ?!

Let us assume I have:

{'Amanda':'Power','Amaly':'Higgens','Joseph':'White','Arlington','Black','Arnold','Schwarzenegger'}

I want to grab the dict's key and values started with 'Ar'...

I could make an iterator and look if it's inside.
I wasn't able to find it, but I am asking myself if dict has a builtin
method to get me these key/values on the fly.

Why do I ask you?! I am working with the ZODB Database, where I make use
of a PersistentDict and PersistentList, and I want


I would thank you for a short reply.



Tamer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top