How can I turn a single element in a list into multiple elements using Python?
Posted
by Trivun
on Stack Overflow
See other posts from Stack Overflow
or by Trivun
Published on 2010-05-07T17:37:36Z
Indexed on
2010/05/07
17:48 UTC
Read the original article
Hit count: 209
I have a list of elements, and each element consists of four seperate values that are seperated by tabs:
['A\tB\tC\tD', 'Q\tW\tE\tR', etc.]
What I want is to create a larger list without the tabs, so that each value is a seperate element:
['A', 'B', 'C', 'D', 'Q', 'W', 'E', 'R', etc.]
How can I do that in Python? I need it for my coursework, due tonight (midnight GMT) and I'm completely stumped.
© Stack Overflow or respective owner