You can do it in a list comprehension:
res=['QA9.1', 'QA4,QA12,QA15,QA16', 'QA9.1']
res1 = [x for a in res for x in a.split(',')]
print(res1)
More Related Contents:
- convert string to list [duplicate]
- How do i search for 2 of the same numbers in a list? (python) [closed]
- How are array types (lists and tuples) and for loops related in Python? [closed]
- Printing the number from a list and its square on the same line in python3 [closed]
- How to reverse a list?
- How does assignment work with list slices?
- Why does Python skip elements when I modify a list while iterating over it?
- Count frequency of words in a list and sort by frequency
- How to define a two-dimensional array?
- Can’t modify list elements in a loop [duplicate]
- How do I make a flat list out of a list of lists?
- Check if string ends with one of the strings from a list
- How to efficiently compare two unordered lists (not sets)?
- Add list to set
- How to find the min/max value of a common key in a list of dicts?
- Python AND operator on two boolean lists – how?
- Converting a list of tuples into a dict
- str.startswith with a list of strings to test for
- Python Array Slice With Comma?
- How to split strings inside a list by whitespace characters
- Complexity of list.index(x) in Python
- How to transform string of space-separated key,value pairs of unique words into a dict
- Python range() and zip() object type
- Python: find closest string (from a list) to another string
- How to override the slice functionality of list in its derived class
- How do I merge multiple lists into one list? [duplicate]
- Python: filtering lists by indices
- How do I reverse a list using recursion in Python?
- How do I send list of dictionary as Body parameter together with Files in FastAPI?
- deque.popleft() and list.pop(0). Is there performance difference?