I have this tuple
({ 'id': '28:1', 'name': 'exAW' }, )
and I want output like this:
{ 'id': '28:1', 'name': 'exAW' }
I need to remove the parenthesis and additional comma.
I am unable to get the desired output using replace function. I tried
res = [(sub[0].replace(K, ''), sub[1]) for sub in test_list]
but I get an error. Can someone help?
tuple[0]
- not a robotsub
andtest_list
? - Mark Tolonen