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
#6
(Apr-11-2021, 11:00 PM)bowlofred Wrote:
(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))))

Both replies (approaches) work like a charm.

Thanks for a lot
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading list items without brackets and quotes jesse68 6 229 Jan-14-2022, 07:07 PM
Last Post: jesse68
  Need to parse a list of boolean columns inside a list and return true values Python84 4 288 Jan-09-2022, 02:39 AM
Last Post: Python84
Question How to gather specific second-level items from a list chatguy 2 332 Dec-17-2021, 05:05 PM
Last Post: chatguy
  deleting select items from a list Skaperen 13 1,143 Oct-11-2021, 01:02 AM
Last Post: Skaperen
  Getting All Items From A List knight2000 4 668 Sep-25-2021, 12:56 AM
Last Post: knight2000
  Delimiters - How to skip some html tags from being translate Melcu54 0 665 May-26-2021, 06:21 AM
Last Post: Melcu54
  Feed List items with Integer euras 9 1,539 May-19-2021, 07:45 PM
Last Post: snippsat
  Sum of list items tristanfermat 2 966 Feb-06-2021, 12:04 PM
Last Post: tristanfermat
  convert List with dictionaries to a single dictionary iamaghost 3 1,259 Jan-22-2021, 03:56 PM
Last Post: iamaghost
  How to append multiple <class 'str'> into a single List ahmedwaqas92 2 1,045 Jan-07-2021, 08:17 AM
Last Post: ahmedwaqas92

Forum Jump:

User Panel Messages

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