Python Forum
Converting String into Nested List
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Converting String into Nested List
#1
I have a nested list . i Need to reorganize it.

Expected Output :

[['Eth1/1,1,eth,f-path,down,Channel,admin down,10G(D),1'],['Eth102/1/15,10,eth,trunk,down,Administratively down,auto(D),--']]
Current Output :

[['Eth1/1        1       eth  f-path down    Channel admin down          10G(D) 1'], ['Eth102/1/15    10      eth  trunk  down    Administratively down     auto(D) --']]
basically a comma (,) after each element. Any idea how can i do it ?

no worries , i made it
Reply
#2
what have you tried so far?
show your code
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Parse Nested JSON String in Python mmm07 4 1,413 Mar-28-2023, 06:07 PM
Last Post: snippsat
  Replace string in a nested Dictianory. SpongeB0B 2 1,147 Mar-24-2023, 05:09 PM
Last Post: SpongeB0B
  List all possibilities of a nested-list by flattened lists sparkt 1 878 Feb-23-2023, 02:21 PM
Last Post: sparkt
  Converting '1a2b3c' string to Dictionary PythonNoobLvl1 6 1,779 May-13-2022, 03:44 PM
Last Post: deanhystad
  Updating nested dict list keys tbaror 2 1,243 Feb-09-2022, 09:37 AM
Last Post: tbaror
  Python Program to Find the Total Sum of a Nested List vlearner 8 4,783 Jan-23-2022, 07:20 PM
Last Post: menator01
  Looping through nested elements and updating the original list Alex_James 3 2,069 Aug-19-2021, 12:05 PM
Last Post: Alex_James
  Need help converting string to int dedesssse 7 2,615 Jul-07-2021, 09:32 PM
Last Post: deanhystad
  Converting a list to dictinary tester_V 8 2,637 Jul-02-2021, 09:04 PM
Last Post: tester_V
  Beautify dictionary without converting to string. sharoon 6 3,297 Apr-11-2021, 08:32 AM
Last Post: buran

Forum Jump:

User Panel Messages

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