https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/Dict-16&feed=atom&action=history
Curso de Programación en Python/Dict-16 - Historial de revisiones
2024-03-29T07:42:08Z
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/Dict-16&diff=7088&oldid=prev
Rrc en 03:58 28 ene 2015
2015-01-28T03:58:48Z
<p></p>
<p><b>Página nueva</b></p><div>__NOTOC__<br />
* [[:#Dict-16 | Dict-16.py]]<br />
** [[:#Resultado | Resultado]]<br />
<br />
== Dict-16.py ==<br />
<br />
<syntaxhighlight lang="python" line="GESHI_FANCY_LINE_NUMBERS"><br />
<br />
#!/usr/bin/python3<br />
#-*-coding: utf-8 -*-<br />
<br />
Llaves = [ "Ave", "Planta", "Piedra" ]<br />
Valores = [2, 4, 7] <br />
<br />
DictNuevo = {}<br />
<br />
for i in range( 0, len( Valores )):<br />
DictNuevo[Llaves[i]] = Valores[i] <br />
<br />
print( "El DictNuevo:", DictNuevo )<br />
<br />
</syntaxhighlight><br />
<br />
=== Resultado ===<br />
<br />
<pre><br />
[rrc@Llawyr PythonClase]$ ./Dict-21.py <br />
El DictNuevo: {'Piedra': 7, 'Planta': 4, 'Ave': 2}<br />
</pre><br />
<br />
[[Category:Programación en Python]]<br />
[[Category:PythonCabal]]<br />
[[Category:CursoPython]]</div>
Rrc