2014年12月27日土曜日

開発環境

Introducing Python: Modern Computing in Simple Packages(Bill Lubanovic (著)、 O'Reilly Media)のChapter 4(Py Crust: Code Structures)、Things to Do 4.12.を解いてみる。

Things to Do 4.12.

コード(BBEdit)

sample12.py

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

titles = ['Creature of Habit', 'Crewel Fate']
plots = ['A num turns into a monster', 'A haunted yarn shop']
movies = dict(zip(titles, plots))
print(movies)

入出力結果(Terminal, IPython)

$ ./sample12.py
{'Creature of Habit': 'A num turns into a monster', 'Crewel Fate': 'A haunted yarn shop'}
$

0 コメント:

コメントを投稿