G
G
George1232017-03-15 22:24:32
Python
George123, 2017-03-15 22:24:32

How to split lists?

The program receives a string as input, which it then splits into a list of words. How to make this list of words divided into sublists, which would consist of one element (word)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SpyDeX, 2017-03-15
@SpyDeX

[[aWord] for aWord in ("This is your string".split(' '))]
is that right?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question