Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80432

Re: What is rstrip() in python?

From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: What is rstrip() in python?
Date 2014-11-09 14:17 +0000
References <c939252e-673b-4cd2-9399-76753a7dd3f7@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.15600.1415542806.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 09/11/2014 11:11, satishmlmlml@gmail.com wrote:
> What is rstrip() in python?

It's a function or method call.

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

I'm not actually sure.  Would you be kind enough to look it up in the 
documentation for me and let me know, thanks?

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

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What is rstrip() in python? satishmlmlml@gmail.com - 2014-11-09 03:11 -0800
  Re: What is rstrip() in python? Chris Angelico <rosuav@gmail.com> - 2014-11-09 22:28 +1100
  Re: What is rstrip() in python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-09 23:57 +1100
  Re: What is rstrip() in python? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-09 14:17 +0000
  Re: What is rstrip() in python? Terry Reedy <tjreedy@udel.edu> - 2014-11-09 12:46 -0500
  Re: What is rstrip() in python? Joel Goldstick <joel.goldstick@gmail.com> - 2014-11-09 14:16 -0500
  Re: What is rstrip() in python? Will Acheson <willyach07@gmail.com> - 2014-11-11 11:53 -0800

csiph-web