[Solved] how get input of multiple lines


Is this what you are after?

>>> d=[]
>>> while(True):
...   s=raw_input()
...   if s=="":break
...   temp = [s]
...   d.append(temp)
... 
a,b,7-6,7-6,6-3
c,d,7-4,7-6,6-2
e,f,6-4,7-6,6-2

>>> d
[['a,b,7-6,7-6,6-3'], ['c,d,7-4,7-6,6-2'], ['e,f,6-4,7-6,6-2']]

This makes a list item out of the input and then appends that list to your main list d
You now should be able to process d

Edit:

If you persist in using 2 delimiters both : and , you are making life more difficult for yourself, Stick with one!
Revising the simple code above:

d=[]
while(True):
    s=raw_input()
    if s=="":break
    temp = [s]
    d.append(temp)              #d becomes a list of lists
for item in d:                  #process individual lists in d
    x=item[0].split(",")        # break up the list using the delimiter comma
    for i in range(0,len(x)):   #access each item in x
        print x[i]

Input:
Djokovic,Murray,2-6,6-7,7-6,6-3,6-1
Bloggs,Smith,2-6,6-7,7-6,6-3,6-3
Jones,Abernathy,6-3,6-3,6-3

Output:

Djokovic    
Murray
2-6
6-7
7-6
6-3
6-1
Bloggs
Smith
2-6
6-7
7-6
6-3
6-3
Jones
Abernathy
6-3
6-3
6-3

4

solved how get input of multiple lines