Latest web development tutorials

Python enthält Übungen 100

Python 100 Li Python 100 Li

Thema: Liste in das Wörterbuch.

Programmanalyse: Keine.

Source Code:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

i = ['a', 'b']
l = [1, 2]
print dict([i,l])

Das obige Beispiel Ausgabe lautet:

{'a': 'b', 1: 2}

Python 100 Li Python 100 Li