<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>https://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Curso_de_Programaci%C3%B3n_en_Python%2FTuple-10</id>
	<title>Curso de Programación en Python/Tuple-10 - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Curso_de_Programaci%C3%B3n_en_Python%2FTuple-10"/>
	<link rel="alternate" type="text/html" href="https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/Tuple-10&amp;action=history"/>
	<updated>2026-04-04T14:04:19Z</updated>
	<subtitle>Historial de revisiones para esta página en el wiki</subtitle>
	<generator>MediaWiki 1.32.1</generator>
	<entry>
		<id>https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/Tuple-10&amp;diff=6774&amp;oldid=prev</id>
		<title>Rrc en 19:15 24 nov 2014</title>
		<link rel="alternate" type="text/html" href="https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/Tuple-10&amp;diff=6774&amp;oldid=prev"/>
		<updated>2014-11-24T19:15:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Tuple-10.py ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;GESHI_FANCY_LINE_NUMBERS&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/python3&lt;br /&gt;
#-*-coding: utf-8 -*-&lt;br /&gt;
&lt;br /&gt;
# Tuple containing unsorted odd numbers&lt;br /&gt;
Impares = ( 13, 9, 3, 5, 11, 7 )&lt;br /&gt;
&lt;br /&gt;
print( &amp;quot;\nTuples son inmutables, entonces como podemos ordenar el tuple Impares:\n{}&amp;quot; .format( Impares ) )&lt;br /&gt;
print( &amp;quot;\nUsamos list() a convertir el tuple y sort() a ordenarlo\n&amp;quot; )&lt;br /&gt;
# Convert to list and sort&lt;br /&gt;
Lista = list( Impares )&lt;br /&gt;
Lista.sort()&lt;br /&gt;
&lt;br /&gt;
print( &amp;quot;La list resultante es:\n{}&amp;quot; .format( Lista ) )&lt;br /&gt;
&lt;br /&gt;
print( &amp;quot;\nUsamos tuple() a convertir la list\n&amp;quot; )&lt;br /&gt;
# Convert back to tuple&lt;br /&gt;
ImparesOrdenados = tuple( Lista )&lt;br /&gt;
print( &amp;quot;El tuple resultante:\n{}\nes ordenado&amp;quot; .format( ImparesOrdenados ) )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resultado ===&lt;br /&gt;
&lt;br /&gt;
[rrc@Llawyr PythonClase]$ ./Tuple-10.py&lt;br /&gt;
 &lt;br /&gt;
 Tuples son inmutables, entonces como podemos ordenar el tuple Impares:&lt;br /&gt;
 (13, 9, 3, 5, 11, 7)&lt;br /&gt;
 &lt;br /&gt;
 Usamos list() a convertir el tuple y sort() a ordenarlo&lt;br /&gt;
 &lt;br /&gt;
 La list resultante es:&lt;br /&gt;
 [3, 5, 7, 9, 11, 13]&lt;br /&gt;
 &lt;br /&gt;
 Usamos tuple() a convertir la list&lt;br /&gt;
 &lt;br /&gt;
 El tuple resultante:&lt;br /&gt;
 (3, 5, 7, 9, 11, 13)&lt;br /&gt;
 es ordenado&lt;br /&gt;
&lt;br /&gt;
=== Explicación ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Programación en Python]]&lt;br /&gt;
[[Category:PythonCabal]]&lt;br /&gt;
[[Category:CursoPython]]&lt;/div&gt;</summary>
		<author><name>Rrc</name></author>
		
	</entry>
</feed>