TECHIES WORLD

For Techs.... Techniques.... Technologies....

LinuxPython

How split line to list in Python

We can split the line to list using split function in Python.

line="This is test"
line.split()

The output be like as follows.

['This', 'is', 'test']

 

Leave a Reply