<pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
    <pre id="vvttv"></pre>

      <p id="vvttv"></p>

          <p id="vvttv"></p>

                <p id="vvttv"></p>

                <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                  <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                    <p id="vvttv"></p>

                    習題 8: 打印,打印?

                     1
                     2
                     3
                     4
                     5
                     6
                     7
                     8
                     9
                    10
                    11
                    12
                    formatter = "%r %r %r %r"
                    
                    print formatter % (1, 2, 3, 4)
                    print formatter % ("one", "two", "three", "four")
                    print formatter % (True, False, False, True)
                    print formatter % (formatter, formatter, formatter, formatter)
                    print formatter % (
                        "I had this thing.",
                        "That you could type up right.",
                        "But it didn't sing.",
                        "So I said goodnight."
                    )
                    

                    你應該看到的結果?

                    $ python ex8.py
                    1 2 3 4
                    'one' 'two' 'three' 'four'
                    True False False True
                    '%r %r %r %r' '%r %r %r %r' '%r %r %r %r' '%r %r %r %r'
                    'I had this thing.' 'That you could type up right.' "But it didn't sing." 'So I said goodnight.'
                    $
                    

                    加分習題?

                    1. 自己檢查結果,記錄你犯過的錯誤,并且在下個練習中盡量不犯同樣的錯誤。
                    2. 注意最后一行程序中既有單引號又有雙引號,你覺得它是如何工作的?

                    Project Versions

                    Table Of Contents

                    Previous topic

                    習題 7: 更多打印

                    Next topic

                    習題 9: 打印,打印,打印

                    This Page

                      <pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
                      <pre id="vvttv"></pre>

                        <p id="vvttv"></p>

                            <p id="vvttv"></p>

                                  <p id="vvttv"></p>

                                  <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                                    <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                                      <p id="vvttv"></p>

                                      这里只有精品视频