TypeError: cannot concatenate 'str' and 'dict' objects

前端 未结 2 1219
情歌与酒
情歌与酒 2021-01-15 15:22

I am a novice in the field, and I wanted to create a program that was useful and fast handling, and run this script, I get this error, and I could not get this error.

<
2条回答
  •  青春惊慌失措
    2021-01-15 15:59

    web_response = {2L: 67.0, 3L: 13.67, 4L: 10.25, 5L: 11.8, 6L: 11.83}
    

    I've a dictionary named "web_response",For concatenation of dictionary with string I used comma ","

    print "web_response=", web_response
    

    Output:

    web_response= {2L: 67.0, 3L: 13.67, 4L: 10.25, 5L: 11.8, 6L: 11.83}
    

提交回复
热议问题