Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lists in list for newbies
#4
Is gathered_list the final output? If so, you are resetting it every loop. You are doing an assignment on line 32, which is completely reseting it to the current list of words. Set gathered_list to [] before the loop, and then just append final_list to gathered_list each loop.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Lists in list for newbies - by LedDiode - Dec-24-2018, 02:43 PM
RE: Lists in list for newbies - by ichabod801 - Dec-24-2018, 02:59 PM
RE: Lists in list for newbies - by LedDiode - Dec-24-2018, 04:15 PM
RE: Lists in list for newbies - by ichabod801 - Dec-24-2018, 07:39 PM
RE: Lists in list for newbies - by LedDiode - Dec-25-2018, 09:48 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  List all possibilities of a nested-list by flattened lists sparkt 1 1,895 Feb-23-2023, 02:21 PM
Last Post: sparkt
  user input values into list of lists tauros73 3 2,120 Dec-29-2022, 05:54 PM
Last Post: deanhystad
  returning a List of Lists nafshar 3 2,127 Oct-28-2022, 06:28 PM
Last Post: deanhystad
  Creating list of lists, with objects from lists sgrinderud 7 3,389 Oct-01-2022, 07:15 PM
Last Post: Skaperen
  What is a circular import? asked by a newbie of newbies ineuw 1 1,605 Sep-16-2022, 07:27 PM
Last Post: Gribouillis
  How to efficiently average same entries of lists in a list xquad 5 3,450 Dec-17-2021, 04:44 PM
Last Post: xquad
  sorting a list of lists by an element leapcfm 3 2,998 Sep-10-2021, 03:33 PM
Last Post: leapcfm
  behavior list of lists roym 5 3,907 Jul-04-2021, 04:43 PM
Last Post: roym
  List of lists - merge sublists with common elements medatib531 1 4,258 May-09-2021, 07:49 AM
Last Post: Gribouillis
  Sort List of Lists by Column Nju 1 15,921 Apr-13-2021, 11:59 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

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