https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/List-3&feed=atom&action=history
Curso de Programación en Python/List-3 - Historial de revisiones
2024-03-29T12:46:44Z
Historial de revisiones para esta página en el wiki
MediaWiki 1.32.1
https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/List-3&diff=119442&oldid=prev
Rrc: /* Resultado */
2015-12-17T19:29:24Z
<p><span dir="auto"><span class="autocomment">Resultado</span></span></p>
<p><b>Página nueva</b></p><div>== List-3.py ==<br />
<br />
<syntaxhighlight lang="python" line="GESHI_FANCY_LINE_NUMBERS"><br />
<br />
#!/usr/bin/python3<br />
#-*-coding: utf-8 -*-<br />
<br />
<br />
Impares = [1, 3, 5]<br />
Pares = [2, 4, 6]<br />
<br />
print( "La list Impares es: {0} y la list Pares es {1}\n"<br />
.format( Impares, Pares ) )<br />
<br />
Impares.extend( Pares )<br />
print( "La list Impares después unir Pares al fin con Impares.extend( Pares ) es:\n{}" .format( Impares ) )<br />
<br />
</syntaxhighlight><br />
<br />
=== Resultado ===<br />
<br />
[rrc@Llawyr PythonClase]$ ./List-3.py<br />
La list Impares es: [1, 3, 5] y la list Pares es [2, 4, 6]<br />
<br />
La list Impares después de unir Pares al fin con Impares.extend( Pares ) es:<br />
[1, 3, 5, 2, 4, 6]<br />
<br />
=== Explicación ===<br />
<br />
<br />
[[Category:Programación en Python]]<br />
[[Category:PythonCabal]]<br />
[[Category:CursoPython]]</div>
Rrc