Python Forum
Can't seem to figure out how to put all of the lists items from a loop into 1 list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't seem to figure out how to put all of the lists items from a loop into 1 list
#5
(Feb-21-2020, 02:26 PM)Gribouillis Wrote: I thought goTerms was a list of lists. What is it exactly?

Its a list of GO numbers for every ID in a list (['P52326', 'P26480', 'P52327', 'P0A2E3', 'P00579', 'O24744', 'P32001', 'P57163', 'Q89B10', 'Q83BB6', 'Q9PDM9', 'Q87DT7', 'Q8PG33', 'P43766', 'Q8P4H2', 'P52325', 'P33452', 'Q59753', 'Q2K619', 'P52324', 'D5AQI9', 'P17531', 'P0CZ15', 'Q1RKH7', 'Q92FZ8', 'Q4UJT1', 'P33451', 'Q68VQ5'])

I also checked the type:
print(type(goTerms))
<class 'list'>
<class 'list'>
<class 'list'>
....
Reply


Messages In This Thread
RE: Can't seem to figure out how to put all of the lists items from a loop into 1 list - by Cosmosso - Feb-21-2020, 02:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to parse and group hierarchical list items from an unindented string in Python? ann23fr 0 89 Yesterday, 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,258 May-22-2023, 10:39 PM
Last Post: ICanIBB
  List all possibilities of a nested-list by flattened lists sparkt 1 878 Feb-23-2023, 02:21 PM
Last Post: sparkt
  Finding combinations of list of items (30 or so) LynnS 1 837 Jan-25-2023, 02:57 PM
Last Post: deanhystad
  user input values into list of lists tauros73 3 1,025 Dec-29-2022, 05:54 PM
Last Post: deanhystad
  returning a List of Lists nafshar 3 1,014 Oct-28-2022, 06:28 PM
Last Post: deanhystad
  Creating list of lists, with objects from lists sgrinderud 7 1,564 Oct-01-2022, 07:15 PM
Last Post: Skaperen
  For Word, Count in List (Counts.Items()) new_coder_231013 6 2,497 Jul-21-2022, 02:51 PM
Last Post: new_coder_231013
  How to get list of exactly 10 items? Mark17 1 2,404 May-26-2022, 01:37 PM
Last Post: Mark17
  how to assign items from a list to a dictionary CompleteNewb 3 1,535 Mar-19-2022, 01:25 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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