Sunsetsea
_bigfish
采纳率0%
2018-11-19 01:49 阅读 1.5k

python2中r开头字符串一行太长,如何写成多行写

         body = r"""{"group_id":%s,"json":"[{\"data\":\"{\\\"Modify\\\":0,\\\"Name\\\":\\\"ExitUnload\\\",\\\"Value\\\":\\\"0\\\",\\\"ValueType\\\":\\\"int\\\",\\\"Details\\\":{\\\"PwdHash\\\":\\\"085a751cdbe0400633a7627b500760cf085a751cdbe0400633a7627b500760cf\\\",\\\"NeedPwd\\\":0}}\",\"bid\":104,\"ver\":27,\"name\":\"ExitUnload\",\"pdata\":\"{\\\"pwd\\\":\\\"\\\"}\",\"inherit\":true},{\"data\":\"{\\\"Modify\\\":0,\\\"Name\\\":\\\"EvlSetting\\\",\\\"Value\\\":\\\"0\\\",\\\"ValueType\\\":\\\"int\\\"}\",\"bid\":104,\"ver\":16,\"name\":\"EvlSetting\",\"pdata\":\"{}\",\"inherit\":true},{\"data\":\"{\\\"Modify\\\":0,\\\"Name\\\":\\\"QMUUpdateType\\\",\\\"Value\\\":\\\"2\\\",\\\"ValueType\\\":\\\"int\\\",\\\"Details\\\":{\\\"TimeType\\\":2,\\\"Day\\\":1,\\\"Hour\\\":0,\\\"Minute\\\":0,\\\"HourEnd\\\":1,\\\"MinuteEnd\\\":0,\\\"Md5\\\":\\\"\\\",\\\"Url\\\":\\\"\\\",\\\"Version\\\":\\\"\\\"}}\",\"bid\":104,\"ver\":14,\"name\":\"QMUUpdateType\",\"pdata\":\"{}\",\"inherit\":true},{\"data\":\"{\\\"Modify\\\":1,\\\"Name\\\":\\\"DataReportFlag\\\",\\\"Value\\\":\\\"1\\\",\\\"ValueType\\\":\\\"int\\\"}\",\"bid\":104,\"ver\":15,\"name\":\"DataReportFlag\",\"pdata\":\"{}\",\"inherit\":true},{\"data\":\"{\\\"Modify\\\":0,\\\"Name\\\":\\\"RTPSelfProtection\\\",\\\"Value\\\":\\\"1\\\",\\\"ValueType\\\":\\\"int\\\"}\",\"bid\":104,\"ver\":18,\"name\":\"RTPSelfProtection\",\"pdata\":\"{}\",\"inherit\":true},{\"data\":\"{\\\"Details\\\":{\\\"ConfigProxyAddress\\\":\\\"\\\",\\\"ConfigProxyDomain\\\":\\\"\\\",\\\"ConfigProxyPassword\\\":\\\"\\\",\\\"ConfigProxyPort\\\":\\\"\\\",\\\"ConfigProxyUsername\\\":\\\"\\\"},\\\"Modify\\\":0,\\\"Name\\\":\\\"ConfigProxyType\\\",\\\"Value\\\":\\\"0\\\",\\\"ValueType\\\":\\\"int\\\"}\",\"bid\":104,\"ver\":17,\"name\":\"ConfigProxyType\",\"pdata\":\"{}\",\"inherit\":true},{\"data\":\"{\\\"Details\\\":{\\\"HTTPDownload\\\":1024,\\\"P2PDownload\\\":99999,\\\"P2PUpload\\\":99999,\\\"ClientUploadTimeout\\\":600},\\\"Modify\\\":0,\\\"Name\\\":\\\"P2spSpeedLimit\\\",\\\"Value\\\":\\\"0\\\",\\\"ValueType\\\":\\\"int\\\"}\",\"bid\":104,\"ver\":56,\"name\":\"P2spSpeedLimit\",\"pdata\":\"{}\",\"inherit\":true},{\"data\":\"{\\\"Name\\\":\\\"P2spControl\\\",\\\"Value\\\":\\\"0\\\",\\\"ValueType\\\":\\\"int\\\",\\\"Modify\\\":0,\\\"Details\\\":{\\\"IP\\\":\\\"\\\"}}\",\"bid\":104,\"ver\":55,\"name\":\"P2spControl\",\"pdata\":\"{}\",\"inherit\":true}]"}"""%(group_id)

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

相关推荐