Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change string into Dict
#1
Hey,
I'm getting data from the web which is basically a dictionary. The problem is that one key refers to another dictionary which is unfortunately a string:

dict = {'somethin':'else','data':'{the other dict}',.......} 
for obvious reasons i want to change it to change it to:

{'somethin':'else','data':{the other dict},.......}
in words that '{the other dict}' goes to {the other dict}

Has someone an idea to do that quick and simple?

thanks in advance

Robin
Reply


Messages In This Thread
Change string into Dict - by Robin_at_Cantelli - May-02-2018, 01:49 PM
RE: Change string into Dict - by gruntfutuk - May-02-2018, 02:01 PM
RE: Change string into Dict - by vishalhule - Mar-05-2020, 10:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  change string in MS word Mr_Blue 8 3,297 Sep-19-2021, 02:13 PM
Last Post: snippsat
  Question about change hex string to integer sting in the list (python 2.7) lzfneu 1 2,520 May-24-2021, 08:48 AM
Last Post: bowlofred
Question dict value, how to change type from int to list? swissjoker 3 2,739 Dec-09-2020, 09:50 AM
Last Post: perfringo
  String index out of bounds ( Python : Dict ) kommu 2 2,386 Jun-25-2020, 08:52 PM
Last Post: menator01
  How can I change a string. Mike Ru 3 2,438 Jun-03-2020, 10:55 AM
Last Post: buran
  TypeError: __repr__ returned non-string (type dict) shockwave 0 3,185 May-17-2020, 05:56 PM
Last Post: shockwave
  Sort a dict in dict cherry_cherry 4 73,076 Apr-08-2020, 12:25 PM
Last Post: perfringo
  dict elements are sometimes treated as List and sometimes as String phython_mdr 4 2,679 Apr-01-2020, 12:47 PM
Last Post: phython_mdr
  TypeError: size; expecting a recognized type filling string dict a11_m11 0 2,518 Feb-10-2020, 08:26 AM
Last Post: a11_m11
  [split] capitalize dict keys for display in string newbieAuggie2019 3 2,991 Oct-10-2019, 10:50 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020