Python Forum
Getting Unique values from LISTS
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting Unique values from LISTS
#1
#I wrote a program that come as a LIST output like below 

['scext', '80.0']
['scext', 'COLFUJDX440_DS11']
['scext', 'Hard disk 1']
['scext', '100.0']
['scext', 'COLFUJDX440_DS11']
['scext', 'Hard disk 2']
['scext', '200.0']
['scext', 'COLFUJDX440_DS11']
['scext', 'Hard disk 3']
['SCEXTVMD', '100.0']
['SCEXTVMD', 'COLHG600P01_DS33']
['SCEXTVMD', 'Hard disk 1']
['SCEXTVMD', '40.0']
['SCEXTVMD', 'COLHG600P01_DS33']
['SCEXTVMD', 'Hard disk 2']
['SCEXTVM', '100.0']
['SCEXTVMD', 'COLHG600P01_DS33']
['SCEXTVMD', 'Hard disk 3'] 
Output:
--- I would like to get unique value from LIST[0] and print it in below format. scext , 80.0, COLFUJDX440_DS11 , Hard disk 1 ,100.0 , COLFUJDX440_DS11,Hard disk 2 ,200.0 ,COLFUJDX440_DS11,Hard disk 3 SCEXTVMD , 100.0, COLHG600P01_DS33 , Hard disk 1 ,40.0 , COLHG600P01_DS33, Hard disk 2,100.0, COLHG600P01_DS33 , Hard disk 3
Please help me
Reply


Messages In This Thread
Getting Unique values from LISTS - by aankrose - Oct-16-2019, 08:37 PM
RE: Getting Unique values from LISTS - by metulburr - Oct-16-2019, 09:28 PM
RE: Getting Unique values from LISTS - by aankrose - Oct-17-2019, 05:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Using Lists as Dictionary Values bfallert 8 611 Apr-21-2024, 06:55 AM
Last Post: Pedroski55
  Get an average of the unique values of a column with group by condition and assign it klllmmm 0 486 Feb-17-2024, 05:53 PM
Last Post: klllmmm
  user input values into list of lists tauros73 3 1,176 Dec-29-2022, 05:54 PM
Last Post: deanhystad
  Split dict of lists into smaller dicts of lists. pcs3rd 3 2,524 Sep-19-2020, 09:12 AM
Last Post: ibreeden
  5 variants to invert dictionaries with non-unique values Drakax1 2 2,699 Aug-31-2020, 11:40 AM
Last Post: snippsat
  Inserting values from multiple lists sqlite azulu 1 2,580 May-24-2020, 08:40 AM
Last Post: ibreeden
  Finding Max and Min Values Associated with Unique Identifiers in Python ubk046 1 2,163 May-08-2020, 12:04 PM
Last Post: anbu23
  How to compare two columns and highlight the unique values of column two using pandas shubhamjainj 0 4,369 Feb-24-2020, 06:19 AM
Last Post: shubhamjainj
  Why does this list of lists end up with the same values alehak 2 2,665 Jul-18-2019, 12:34 PM
Last Post: perfringo
  Generate unique random numbers from different lists Takeshio 5 3,903 May-24-2019, 07:29 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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