What is rstrip() in python?

satishmlmlml at gmail.com satishmlmlml at gmail.com
Sun Nov 9 12:11:44 CET 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