What is rstrip() in python?

satishmlmlml at gmail.com satishmlmlml at gmail.com
Sun Nov 9 06:11:44 EST 2014


What is rstrip() in python?

What does it do in the following piece of code?

import sqlite3
conn = sqlite3.connect('dbase1')
curs = conn.cursor()

file = open('data.txt')
rows = [line.rstrip().split(',') for line in file]



More information about the Python-list mailing list