1

I am trying to convert a string to dict and for some reason, %0a gets added. Tried converting using ast and JSON modules with no luck. The strings are read from a file. Below is a sample record:

{"description" : "GA", "ip" : "10.145.133.4", "username" : "admin", "password" : "admin", "lol" : "lol", "lol_u" : "j", "lol_p" : "pass", "owner" : []}

The %0a is added to the IP address as follows:

host='10.145.133.4%0a'

And that change messes up the program.

Any ideas why this is happening and how fix this? Thanks!

timiTao
  • 1,417
  • 3
  • 20
  • 34

0 Answers0