<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>http://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Curso_de_Programaci%C3%B3n_en_Python%2FTuple-8</id>
	<title>Curso de Programación en Python/Tuple-8 - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Curso_de_Programaci%C3%B3n_en_Python%2FTuple-8"/>
	<link rel="alternate" type="text/html" href="http://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/Tuple-8&amp;action=history"/>
	<updated>2026-05-18T11:22:15Z</updated>
	<subtitle>Historial de revisiones para esta página en el wiki</subtitle>
	<generator>MediaWiki 1.32.1</generator>
	<entry>
		<id>http://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/Tuple-8&amp;diff=6552&amp;oldid=prev</id>
		<title>Rrc en 19:59 15 oct 2014</title>
		<link rel="alternate" type="text/html" href="http://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/Tuple-8&amp;diff=6552&amp;oldid=prev"/>
		<updated>2014-10-15T19:59:05Z</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-8.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;
Mascotas = ( &amp;quot;Zorrilla&amp;quot;, &amp;quot;Puerca&amp;quot;, &amp;quot;Cuyo&amp;quot;, &amp;quot;Tortuga&amp;quot;, &amp;quot;Halcón&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
print( &amp;quot;El tuple Mascotas es:\n{}&amp;quot; .format( Mascotas ) )&lt;br /&gt;
&lt;br /&gt;
Index = Mascotas.index( &amp;quot;Cuyo&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
print( &amp;quot;\nEl index del miembro \&amp;quot;Cuyo\&amp;quot; en Mascotas es: {}&amp;quot; .format( Index ) )&lt;br /&gt;
print( &amp;quot;\nEl miembro en index: {0} en Mascotas es: {1}&amp;quot; .format( Index, Mascotas[Index] ) )&lt;br /&gt;
&lt;br /&gt;
print( &amp;quot;\nPero si usamos un miembro que no existe cómo Index2 = Mascotas.index( \&amp;quot;Gato\&amp;quot; ) obtenemos:&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
Index2 = Mascotas.index( &amp;quot;Gato&amp;quot; )&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-8.py&lt;br /&gt;
 El tuple Mascotas es:&lt;br /&gt;
 (&amp;#039;Zorrilla&amp;#039;, &amp;#039;Puerca&amp;#039;, &amp;#039;Cuyo&amp;#039;, &amp;#039;Tortuga&amp;#039;, &amp;#039;Halcón&amp;#039;)&lt;br /&gt;
 &lt;br /&gt;
 El index del miembro &amp;quot;Cuyo&amp;quot; en Mascotas es: 2&lt;br /&gt;
 &lt;br /&gt;
 El miembro en index: 2 en Mascotas es: Cuyo&lt;br /&gt;
 &lt;br /&gt;
 Pero si usamos un miembro que no existe cómo Index2 = Mascotas.index( &amp;quot;Gato&amp;quot; ) obtenemos:&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;./Tuple-8.py&amp;quot;, line 15, in &amp;lt;module&amp;gt;&lt;br /&gt;
     Index2 = Mascotas.index( &amp;quot;Gato&amp;quot; )&lt;br /&gt;
 ValueError: tuple.index(x): x not in tuple&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>