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-January/001801.html below:

[Python-Dev] ''.join in 1.6

[Python-Dev] ''.join in 1.6 [Python-Dev] ''.join in 1.6David Ascher da@ski.org
Wed, 19 Jan 2000 12:54:03 -0800
Gerrit Holl

> Currently, I would join it this way into a tab-delimeted string:
> s = string.join(l, '\t')
>
> In 1.6, I should do it this way:
> '\t'.join(s)
>
> I think it would be better to have that method on the *list*:
> s.join('\t')
>
> That's more clear, isn't it?

As Tim pointed out when they were discussed, the clearest way to express it
with the new methods is to do:

tab = '\t'

tab.join(s)

Similarly

space = ' '
space.join(s)

etc.

--david ascher




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