Possible Duplicate:
Flatten (an irregular) list of lists in Python
for instance, from:
[[1,2,3],'a',[[4],[5,6],7]]
we want to flatten/penetrate the structure and get all the elements at bottom listed in a line:
[1,2,3,'a',4,5,6,7]
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
it’s a practice of recursive function, :). the “outlist” here serves as a reference for return-list.
there must be better structures…
😉
for example: