If we don't know the number of entries then how to stop a input() loop of while or for
<p>I tried to get input by bigger number entries but it says "index out of range"</p>

<p>if we don't know the number of entries then how to stop a input() loop of while or for, in python: </p>

<pre><code>while():
 listMatch.append(input())
</code></pre>

<p>Look what if I have:</p>

<pre><code>Djokovic:Murray:2-6,6-7,7-6,6-3,6-1 
Murray:Djokovic:6-3,4-6,6-4,6-3 
Djokovic:Murray:6-0,7-6,6-7,6-3 
Murray:Djokovic:6-4,6-4 
Djokovic:Murray:2-6,6-2,6-0 
Murray:Djokovic:6-3,4-6,6-3,6-4 
Djokovic:Murray:7-6,4-6,7-6,2-6,6-2 
Murray:Djokovic:7-5,7-5 
Williams:Muguruza:3-6,6-3,6-3
</code></pre>

<p>AND </p>

<pre><code>Halep:Raonic:2-6,6-7,7-6,6-3,6-1
Kerber:Raonic:6-3,4-6,6-4,6-3
Raonic:Wawrinka:6-0,7-6,6-7,6-3
Wawrinka:Raonic:6-4,6-4
Halep:Raonic:2-6,6-2,6-0
Wawrinka:Raonic:6-3,4-6,6-3,6-4
Raonic:Wawrinka:7-6,4-6,7-6,2-6,6-2
Wawrinka:Kerber:7-5,7-5
Halep:Kerber:3-6,6-3,6-3
Halep:Wawrinka:0-6,0-6,6-0,6-0,7-5
Kerber:Wawrinka:6-3,4-6,7-6,0-6,7-5
</code></pre>

<p>Here I don't know how many entries I want to enter. In above examples there are 9 and 11.</p>

<p>add a control loop that checks for input:</p>

<pre><code>listMatch =[]
while(True):
    input_value = input()
    if(input_value == '' or  input_value == 'quit'): 
        break
    listMatch.append(input_value)
</code></pre>

<p>if no text or quit is entered, loop will break</p>

python loops for-loop input while-loop