Exercise 8: Printing Printing
- 章节名:Exercise 8: Printing Printing
1. when to use %r instead of %s: e.g. %r shows with quotes when it is string 2. print str1 + str2, #watch the comma at the end of it, is a space print str3 + str 4 3. code:
result:
4. """Double quotes, single quotes, triple double quotes and triple single quotes...""" Watch the last print, why there are both double quotes and single quotes...
33人阅读
Charlene Jiang对本书的所有笔记 · · · · · ·
-
The Hard Way is Easier
As you study this book, and continue with programming, remember that anything worth doi...
-
Exercise 8: Printing Printing
-
Exercise 22: What Do You Know So Far?
1. underscore character 2. %s %d %r %f %e 3. print "-" , '-' , """-""" , '''-''' ...
-
Exercise 26: Congratulations, Take A Test!
To fix an existing file: http://learnpythonthehardway.org/exercise26.txt 1. Definitions...
> 查看全部9篇
说明 · · · · · ·
表示其中内容是对原文的摘抄