我得到下面的python输出作为一个字符串,我想在字符串中有“J”值

时间:2016-06-22 14:02:17

标签: python-3.x

  

'[('a = 123,b = 3456,c = 789',{'D':[b'F'],'G':[b'H'],'I':[b' J'],'K':[b'L']})]'

     

我想解析这个字符串并从中获取J值

1 个答案:

答案 0 :(得分:0)

var = [('a = 123,b = 3456,c = 789',{'D':[b'F'],'G':[b'H'],'I':[b 'J'],'K':[b'L']})] out =(“var [0] [1] ['I']:”,a [0] [1] ['I'])[1] [0] .decode(“utf-8”) 打印(出)