python find substrings based on a delimiter
I am new to python , so I might be missing some thing simple.
I am given a example
string = "The , world , is , a , happy , place "
I have to create substrings separated by , and print them and process
instances separately . i.e. in this example i should be able to print
The
world
is
a
happy
place
What approach can i take . I was trying to use string find functionality ,
but
Str[0: Str.find(",") ]
does not helps in finding 2nd , 3rd instances .
No comments:
Post a Comment