<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 ???
                    ??12?? ????/???
                    ???? ?????? ????

                    ??????

                    Python????????????飬???pickle?????????????????????д????κ?Python?????????????????????????????????????? ???? ???????

                    ??????????????cPickle??????????pickle??????????????????????C?????д?????????????pickle??1000???????????????????е???????????????????????cPickle??顣??????????????????鶼????pickle??顣

                    ???????????

                    ??12.2 ???????????

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


                    import cPickle as p
                    #import pickle as p

                    shoplistfile = 'shoplist.data'
                    # the name of the file where we will store the object

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

                    # Write to the file
                    f = file(shoplistfile, 'w')
                    p.dump(shoplist, f)
                    # dump the object to a file
                    f.close()

                    del shoplist # remove the shoplist

                    # Read back from the storage

                    f = file(shoplistfile)
                    storedlist = p.load(f)

                    print storedlist

                    ????????code/pickling.py??

                    ???

                    $ python pickling.py
                    ['apple', 'mango', 'carrot']

                    ????ι???

                    ???????????????????import..as?????????????????????????????????????????????????????????У?????????????????????????о??л??????????饗cPickle????pickle????????????????????????????????????p??

                    ?????????????????????????д???????file???????????????????dump????????????浽????????С?????????? ???? ??

                    ???????????????pickle????load?????????????????????????? ????? ??


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

                                      这里只有精品视频