始めてみた

なにか新しいことを始めるとき,モチベーション維持するためのBlog.

python by ドットインストール lesson 5

# coding: UTF-8
# 文字列
# "hello" 'helo' シングルクオテーションでもおk
# 日本語 u"こんにちは" unicodeの意味のuを先頭につける -> 長さを調べる命令が正しく動かない.
# 文字列連結 +        文字列繰り返し *
# エスケープ バックスラッシュ \  改行:\n タブ:\t バックスラッシュ:\\ シングルクオテーション: \'

print "hello" + "world" 
print u"無駄" * 10 
print 'hello \n wo\trld \\ it\'s a pen'

# ある程度長い文章を改行付きで表現したい -> クオテーション三連続でくくる """ ~~~ """
print """<html lang=ja>
<body>
</body>
</html>
"""