A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-December/011209.html below:

[Python-Dev] chomp()?

[Python-Dev] chomp()? [Python-Dev] chomp()?Moshe Zadka moshez@zadka.site.co.il
28 Dec 2000 16:51:32 -0000
On Thu, 28 Dec 2000, Guido van Rossum <guido@digicool.com> wrote:

> Someone just posted a patch to implement s.chomp() as a string method:
...
> Any comments?  Is this needed given that we have s.rstrip() already?

Yes.

i=0
for line in fileinput.input():
	print '%d: %s' % (i, line.chomp())
	i++

I want that operation to be invertable by

sed 's/^[0-9]*: //'



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4