import re
red_dict= {u'Jharkhand': ['jarka09', 'jarka05'],
u'Karnataka': ['karnataka2013', 'karnatka2008']}
for key, value in red_dict.items():
num = re.findall(r'\d+',' '.join(value))
map(lambda x: x if len(x)==4 else '20'+x, num)
print num
Getting the result
['09', '05']
['2013', '2008']
Why wasn't '20' appended to the two digit list items?
For ordinary use, I can verify that this approach works
l = ['a','b','cd']
map(lambda x:x if len(x)==2 else 'e'+x,l)
gives
['ea', 'eb', 'cd']