how to check values if it has a like/same key in a dict in python?
<p>how can I check values if the key has <code>'extra_'</code> in <code>dict</code>?</p>

<p>this what i have done :</p>

<pre><code>&gt;&gt;&gt; dict =  { u'last_name': [u'hbkjh'], u'no_of_nights': [u'1'], u'check_in': [u'2012-03-19'], u'no_of_adult': [u'', u'1'], u'csrfmiddlewaretoken': [u'05e5bdb542c3be7515b87e8160c347a0'], u'memo': [u'kjhbn'], u'totalcost': [u'1800.0'], u'product': [u'4'], u'exp_month': [u'1'], u'quantity': [u'2'], u'price': [u'900.0'], u'first_name': [u'sdhjb'], u'no_of_kid': [u'', u'0'], u'exp_year': [u'2012'], u'check_out': [u'2012-03-20'], u'email': [u'ebmalifer@agile.com.ph'], u'contact': [u'3546576'], u'extra_test1': [u'jknj'], u'extra_test2': [u'jnjl'], u'security_code': [u'3245'], u'charged': [u'200.0']}
&gt;&gt;&gt; for x in dict:
...  x
... 
u'totalcost'
u'check_in'
u'last_name'
u'extra_test2'
u'memo'
u'extra_test1'
u'product'
u'email'
u'charged'
u'no_of_nights'
u'no_of_kid'
u'contact'
u'exp_month'
u'first_name'
u'no_of_adult'
u'csrfmiddlewaretoken'
u'exp_year'
u'check_out'
u'price'
u'security_code'
u'quantity'
&gt;&gt;&gt; 
</code></pre>

<p>this is what i want to be the output if <code>dict</code> has key like <code>'extra_'</code>:</p>

<pre><code>u'extra_test1' : [u'jknj']
u'extra_test2' : [u'jnjl']
</code></pre>

<p>thanks in advance ...</p>
