Q:

Split lists within list

Input:
[['Tryndamere', 'Barbarian', 'Fighter'],['Caitlyn', 'Sheriff', 'Marksmen'],...['Veigar', 'Midget', 'Mage']]

Expected output:
['Barbarian']['Caitlyn']['Fighter']['Mage']['Marksmen']['Midget']['Sheriff']['Tryndamere']['Veigar']...

Question:
How to separate the lists within a list till they become individual elements?  Thanks guys

A:

Let's say the data looks like this
>>> lists = [
...     ['Tryndamere', 'Barbarian', 'Fighter'],
...     ['Caitlyn', 'Sheriff', 'Marksmen'],
...     ['Veigar', 'Midget', 'Mage']
... ]

then, you can use list comprehension like this
>>> from pprint import pprint
>>> pprint([[item] for c_list in lists for item in c_list])
[['Tryndamere'],
 ['Barbarian'],
 ['Fighter'],
 ['Caitlyn'],
 ['Sheriff'],
 ['Marksmen'],
 ['Veigar'],
 ['Midget'],
 ['Mage']]

Or using itertools.chain
>>> from itertools import chain
>>> pprint([[item] for item in chain.from_iterable(lists)])
[['Tryndamere'],
 ['Barbarian'],
 ['Fighter'],
 ['Caitlyn'],
 ['Sheriff'],
 ['Marksmen'],
 ['Veigar'],
 ['Midget'],
 ['Mage']]

But if you are thinking about flattening those lists into a single list, then please check this.  You can easily extend the chain version to do that, like this
>>> pprint(list(chain.from_iterable(lists)))
['Tryndamere',
 'Barbarian',
 'Fighter',
 'Caitlyn',
 'Sheriff',
 'Marksmen',
 'Veigar',
 'Midget',
 'Mage']

Or the list comprehension version,
>>> pprint([item for c_list in lists for item in c_list])
['Tryndamere',
 'Barbarian',
 'Fighter',
 'Caitlyn',
 'Sheriff',
 'Marksmen',
 'Veigar',
 'Midget',
 'Mage']

