<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>

                    ???? Python ???
                    ??9?? ?????
                    ???? ?б? ????

                    ?б?

                    list?????????????????????????????????????б??д洢??? ???? ???????????????????????б?????????????????????????????????б???????????????????????????????????????????У?????Python?У????????????????????䶮

                    ?б??е??????e???????????У?????Python??????????????????б???????????????б???????????????????????б??е??????????????????????????????????б??? ???? ??????????????????????????????

                    ????????????????

                    ????????????????????????????????????????????????????????б??????????????????????????????

                    ?б???????????????????????????????i?????????????????縳????5????????????????????????????int?????????????i?????????????????help(int)??????????????

                    ???????????????????????????????????????????????????????????????????Щ????????磬Python?list??????append????????????????????б?β???????????????mylist.append('an item')?б?mylist??????????????????????????????????????

                    ?????????????????????????????????????????????????????????????????????Щ????/??????????????????????mylist.field??

                    ????б?

                    ??9.1 ????б?

                    #!/usr/bin/python
                    # Filename: using_list.py

                    # This is my shopping list

                    shoplist = ['apple', 'mango', 'carrot', 'banana']

                    print 'I have', len(shoplist),'items to purchase.'

                    print 'These items are:', # Notice the comma at end of the line
                    for item in shoplist:
                        print item,

                    print '\nI also have to buy rice.'
                    shoplist.append('rice')
                    print 'My shopping list is now', shoplist

                    print 'I will sort my list now'
                    shoplist.sort()
                    print 'Sorted shopping list is', shoplist

                    print 'The first item I will buy is', shoplist[0]
                    olditem = shoplist[0]
                    del shoplist[0]
                    print 'I bought the', olditem
                    print 'My shopping list is now', shoplist

                    ????????code/using_list.py??

                    ???

                    $ python using_list.py
                    I have 4 items to purchase.
                    These items are: apple mango carrot banana
                    I also have to buy rice.
                    My shopping list is now ['apple', 'mango', 'carrot', 'banana', 'rice']
                    I will sort my list now
                    Sorted shopping list is ['apple', 'banana', 'carrot', 'mango', 'rice']
                    The first item I will buy is apple
                    I bought the apple
                    My shopping list is now ['banana', 'carrot', 'mango', 'rice']

                    ????ι???

                    ????shoplist??????????б????shoplist?У???????洢?????????????????????????????????????б?????? ?κ????????? ???????????????б??

                    ??????????for..in??????б??и???????顣????????????????????????б??????????С????е??????????????????????

                    ?????????print?????β???????? ???? ?????????print?????????????з??????????е????????????????Ч??

                    ???????????????append???????б????????????????????????????????????????????????????б??????????????????????????????б????????б?????????б?????print?????????????????????????

                    ?????????????????б??sort?????????б??????????????????????????б???????????????????????б??????????????????????????????????????????б??? ???? ????????? ?????? ??

                    ?????????????????г???????????????????????????????б???????????????del???????????????????????????????????????б??е???????????del??????????б????????????????????????????б??е???????????????????del shoplist[0]???????Python??0???????????

                    ????????????б??????????з????????????help(list)?????????????


                    ???? ????? ????
                    ??? ??? ???
                    ?????
                    @ssv

                      <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>

                                      这里只有精品视频