Python Forum
Parse String between 2 Delimiters and add as single list items
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parse String between 2 Delimiters and add as single list items
#5
(Apr-11-2021, 09:52 PM)lastyle Wrote: ouch my Bad, i posted to the wring Subcategory. My python version is 2.7.18

2.7 won't have f-strings. Just change the print to use another format method.


for k, v in data[0].items():
    print(" => ".join((str(k), str(v))))
Reply


Messages In This Thread
RE: Parse String between 2 Delimiters and add as single list items - by bowlofred - Apr-11-2021, 11:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How do I parse the string? anna17 4 275 Apr-10-2024, 10:26 AM
Last Post: DeaD_EyE
  How to parse and group hierarchical list items from an unindented string in Python? ann23fr 0 182 Mar-27-2024, 01:16 PM
Last Post: ann23fr
  Why do I have to repeat items in list slices in order to make this work? Pythonica 7 1,324 May-22-2023, 10:39 PM
Last Post: ICanIBB
  [split] Parse Nested JSON String in Python mmm07 4 1,523 Mar-28-2023, 06:07 PM
Last Post: snippsat
  Finding combinations of list of items (30 or so) LynnS 1 873 Jan-25-2023, 02:57 PM
Last Post: deanhystad
  Need help on how to include single quotes on data of variable string hani_hms 5 2,015 Jan-10-2023, 11:26 AM
Last Post: codinglearner
  parse String jaykappy 2 756 Dec-23-2022, 07:42 AM
Last Post: praveencqr
  python sql query single quote in a string mg24 1 1,057 Nov-18-2022, 08:01 PM
Last Post: deanhystad
  mutable values to string items? fozz 15 2,800 Aug-30-2022, 07:20 PM
Last Post: deanhystad
  For Word, Count in List (Counts.Items()) new_coder_231013 6 2,577 Jul-21-2022, 02:51 PM
Last Post: new_coder_231013

Forum Jump:

User Panel Messages

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