how to rename key value in python
<p>how can i rename key value in python?</p>

<p>i have this code :</p>

<pre><code>t =  { 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'extra_charged': [u'200.0']}
key = {str(k): str(v[0]) for k,v in t.iteritems() if k.startswith('extra_')}
array = []
for val in key:
    data = str(val) + ' = ' + key[val] + ','
    array.append(data)
print array
</code></pre>

<p>it give me this :</p>

<pre><code>["extra_charged = 200.0,", "extra_test1 = jknj,", "extra_test2 = jnjl,"]
</code></pre>

<p>what should i do to remove the <code>'extra_'</code> and it makes the output like this:</p>

<pre><code>["CHARGED = 200.0,", "TEST1 = jknj,", "TEST2 = jnjl,"]
</code></pre>

<p>can anyone have an idea about my case?
thanks in advance ...</p>
