satishmlm...@gmail.com wrote:

> What is rstrip() in python?

Have you read the Fine Manual?

Did you try googling first?

https://duckduckgo.com/html/?q=python+rstrip


> What does it do in the following piece of code?

It removes trailing whitespace.


> import sqlite3
> conn = sqlite3.connect('dbase1')
> curs = conn.cursor()
> 
> file = open('data.txt')
> rows = [line.rstrip().split(',') for line in file]


-- 
Steven

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to