開発環境
- OS X Yosemite - Apple (OS)
- Emacs (CUI)、BBEdit - Bare Bones Software, Inc. (GUI) (Text Editor)
- Python 3.4 (プログラミング言語)
Introducing Python: Modern Computing in Simple Packages(Bill Lubanovic (著)、 O'Reilly Media)のChapter 7(Mangle Data Like a Pro)、Things to Do 7.4.を解いてみる。
Things to Do 7.4.
コード(BBEdit)
sample4.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
print('My kitty cat likes %s,' % 'roast beef',
'My kitty cat likes %s,' % 'ham',
'My kitty cat fell on his %s,' % 'head',
'And now thinks he\'s a %s.' % 'calm',
sep='\n')
入出力結果(Terminal, IPython)
$ ./sample4.py My kitty cat likes roast beef, My kitty cat likes ham, My kitty cat fell on his head, And now thinks he's a calm. $
0 コメント:
コメントを投稿