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/2005-September/056474.html below:

[Python-Dev] list splicing

[Python-Dev] list splicing [Python-Dev] list splicingGreg Ewing greg.ewing at canterbury.ac.nz
Mon Sep 19 07:25:29 CEST 2005
Karl Chen wrote:
> Hi, has anybody considered adding something like this:
>     a = [1, 2]
>     [ 'x', *a, 'y']
> 
> as syntactic sugar for
>     a = [1, 2]
>     [ 'x' ] + a + [ 'y' ].

You can write that as
   a = [1, 2]
   a[1:1] = a

Greg
More information about the Python-Dev mailing list

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