<?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%2FSet-7</id>
	<title>Curso de Programación en Python/Set-7 - 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%2FSet-7"/>
	<link rel="alternate" type="text/html" href="https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/Set-7&amp;action=history"/>
	<updated>2026-04-04T12:32:39Z</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/Set-7&amp;diff=6807&amp;oldid=prev</id>
		<title>Rrc en 19:47 25 nov 2014</title>
		<link rel="alternate" type="text/html" href="https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/Set-7&amp;diff=6807&amp;oldid=prev"/>
		<updated>2014-11-25T19:47:00Z</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;__NOTOC__&lt;br /&gt;
* [[:#Set-7 | Set-7.py]]&lt;br /&gt;
** [[:#Resultado | Resultado]]&lt;br /&gt;
&lt;br /&gt;
== Set-7.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;
#!/usr/bin/python3&lt;br /&gt;
#-*-coding: utf-8 -*-&lt;br /&gt;
&lt;br /&gt;
Animales = { &amp;quot;Gato&amp;quot;, &amp;quot;Perro&amp;quot;, &amp;quot;Agaporni&amp;quot;, &amp;quot;Lobo&amp;quot; }&lt;br /&gt;
print( &amp;quot;Animales:&amp;quot;, Animales )&lt;br /&gt;
&lt;br /&gt;
# Tiramos lo que no existe.&lt;br /&gt;
Animales.discard( &amp;quot;Cebra&amp;quot; )&lt;br /&gt;
print( &amp;quot;Animales:&amp;quot;, Animales )&lt;br /&gt;
&lt;br /&gt;
Animales.discard( &amp;quot;Gato&amp;quot; )&lt;br /&gt;
print( &amp;quot;Animales:&amp;quot;, Animales )&lt;br /&gt;
&lt;br /&gt;
Animales.remove( &amp;quot;Agaporni&amp;quot; )&lt;br /&gt;
print( &amp;quot;Animales:&amp;quot;, Animales )&lt;br /&gt;
&lt;br /&gt;
# Remove nos da un error si el elemento no existe.&lt;br /&gt;
Animales.remove( &amp;quot;Ballena&amp;quot; )&lt;br /&gt;
print( &amp;quot;Animales:&amp;quot;, Animales )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resultado ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[rrc@Llawyr PythonClase]$ ./Set-7.py &lt;br /&gt;
Animales: {&amp;#039;Gato&amp;#039;, &amp;#039;Perro&amp;#039;, &amp;#039;Lobo&amp;#039;, &amp;#039;Agaporni&amp;#039;}&lt;br /&gt;
Animales: {&amp;#039;Gato&amp;#039;, &amp;#039;Perro&amp;#039;, &amp;#039;Lobo&amp;#039;, &amp;#039;Agaporni&amp;#039;}&lt;br /&gt;
Animales: {&amp;#039;Perro&amp;#039;, &amp;#039;Lobo&amp;#039;, &amp;#039;Agaporni&amp;#039;}&lt;br /&gt;
Animales: {&amp;#039;Perro&amp;#039;, &amp;#039;Lobo&amp;#039;}&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
  File &amp;quot;./Set-7.py&amp;quot;, line 18, in &amp;lt;module&amp;gt;&lt;br /&gt;
    Animales.remove( &amp;quot;Ballena&amp;quot; )&lt;br /&gt;
KeyError: &amp;#039;Ballena&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;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>