Python Forum
flattening a list with some elements being lists
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
flattening a list with some elements being lists
#12
(Aug-06-2018, 10:26 AM)perfringo Wrote: This is the reason I like Python - smart people (like buran) can achieve desired results with minimal and very readable piece of code. I have lot of work to do in smart part
We all are smart people. I just don't know enough. I've got RecursionError and it was said to me that it's because the strings are iterable. Then I saw how can be done for strings. I see it now too. I still don't get it why if I use a generator in the way I've done it I get this error. Yes, strings are iterable but I tried it on a small piece of data.
Something happens internally and I just don't know what it is. If one can explain it, please!
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
RE: flattening a list with some elements being lists - by wavic - Aug-06-2018, 10:45 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  unable to remove all elements from list based on a condition sg_python 3 638 Jan-27-2024, 04:03 PM
Last Post: deanhystad
Question mypy unable to analyse types of tuple elements in a list comprehension tomciodev 1 608 Oct-17-2023, 09:46 AM
Last Post: tomciodev
  List all possibilities of a nested-list by flattened lists sparkt 1 1,048 Feb-23-2023, 02:21 PM
Last Post: sparkt
  Checking if a string contains all or any elements of a list k1llcod3 1 1,315 Jan-29-2023, 04:34 AM
Last Post: deanhystad
  user input values into list of lists tauros73 3 1,246 Dec-29-2022, 05:54 PM
Last Post: deanhystad
  returning a List of Lists nafshar 3 1,212 Oct-28-2022, 06:28 PM
Last Post: deanhystad
  Creating list of lists, with objects from lists sgrinderud 7 1,847 Oct-01-2022, 07:15 PM
Last Post: Skaperen
  How to change the datatype of list elements? mHosseinDS86 9 2,221 Aug-24-2022, 05:26 PM
Last Post: deanhystad
  ValueError: Length mismatch: Expected axis has 8 elements, new values have 1 elements ilknurg 1 5,518 May-17-2022, 11:38 AM
Last Post: Larz60+
  How to efficiently average same entries of lists in a list xquad 5 2,313 Dec-17-2021, 04:44 PM
Last Post: xquad

Forum Jump:

User Panel Messages

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