Home > other > Python character substitution problem
Python character substitution problem
Time:12-02
STR='{" CONTENT ":" hello, I want to query: anhui fangyuan special equipment technical development co., LTD., in 2018 the company has special equipment qualification is valid, ", "CONTENTTYPE" : 1, "DEPARTMENT" : "special equipment safety supervision", "INSERTDATE" : "2020-06-17", "PUBMESS" : 1, "PUBTIME" : "2020-06-24", "RESPEAT" : "please telephone counseling: 010-82261672,", "the ROWID" : 1, "SEP" : 4, "TITLE" : "fangyuan special equipment technical development co., LTD in anhui province", "USERNAME" : "the king left"}'
I want to get rid of the "SEP" : 4, Use STR=STR. Replace (' "SEP" : 4, ', ') doesn't work, change how to solve?
CodePudding user response:
Print (STR) see as a result, there is the effect you want