title: How shall I omit last empty string from list data?
body: <p>I have a <code>.csv</code> file. it has multiple column data like</p>
  
  <pre><code>fruit,color,shape,size,price,quantity,
  apple,red,,small,,,
  orange,orange,,,,,
  </code></pre>
  
  <p>now I want to create a string with above information like </p>
  
  <ol>
  <li>apple,red,,small</li>
  <li>orange,orange</li>
  </ol>
  
  <p>my code is </p>
  
  <pre><code>for line in rf:
      data = line.strip().split(",")
  </code></pre>
  
  <p>this is giving me </p>
  
  <pre><code>data = ["apple","red","","small","",""]
  </code></pre>
  
  <p>How shall I omit last empty string from list data</p>
  
  <p>Thank you</p>