Python Forum
How to modify item in dictionary?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to modify item in dictionary?
#2
We know doc is a dictionary. We don't know what key is, since we can't see your data (but it appears to be a string).

Depending on the XML, the contents of doc['kml']['Document']['Placemark'] might be other datastructures that you can modify or just strings which you can't. Can you show the relevant section of the xml file?
Reply


Messages In This Thread
How to modify item in dictionary? - by Winfried - Nov-21-2020, 12:48 AM
RE: How to modify item in dictionary? - by bowlofred - Nov-21-2020, 01:22 AM
RE: How to modify item in dictionary? - by Winfried - Nov-21-2020, 01:37 AM
RE: How to modify item in dictionary? - by Winfried - Nov-21-2020, 12:55 PM
RE: How to modify item in dictionary? - by Winfried - Nov-21-2020, 01:01 PM
RE: How to modify item in dictionary? - by Winfried - Nov-21-2020, 01:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  For Loop and Use of Brackets to Modify Dictionary in Tic-Tac-Toe Game new_coder_231013 7 3,956 Dec-28-2021, 11:32 AM
Last Post: new_coder_231013
  Remove an item from a list contained in another item in python CompleteNewb 19 9,234 Nov-11-2021, 06:43 AM
Last Post: Gribouillis
  Modify a dictionary NathanF 2 2,898 Aug-29-2019, 03:36 PM
Last Post: NathanF
  looking fo an expression that yields a dictionary without an item Skaperen 5 4,230 Apr-09-2019, 02:05 AM
Last Post: Skaperen
  curious syntax with dictionary item inselbuch 3 3,677 Mar-09-2019, 04:21 PM
Last Post: ichabod801
  deleting item from dictionary Skaperen 6 4,169 Feb-20-2019, 01:18 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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