<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    weidagang2046的專欄

    物格而后知致
    隨筆 - 8, 文章 - 409, 評論 - 101, 引用 - 0
    數據加載中……

    怎樣把一個二維數組寫入文件

    發信人: ilovecpp (cpp), 信區: Python
    標  題: Re: 怎樣把一個二維數組寫入文件?
    發信站: 水木社區 (Tue Jan 17 23:39:50 2006), 站內

    【 在 petre (petre) 的大作中提到: 】
    : 比如
    : A=[[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]]
    : 寫入文件后文件內容是
    : 1 2 3 4
    : 5 6 7 8
    : 9 10 11 12
    : 13 14 15 16
    : 就是不能帶"[ ]"
    : 每行占一行
    : 急著用,不熟悉python
    : //bow

    print >>open('a.txt', 'w'), '\n'.join([' '.join(map(str, i)) for i in A])

    posted on 2006-01-19 15:48 weidagang2046 閱讀(4881) 評論(1)  編輯  收藏 所屬分類: Python

    評論

    # re: 怎樣把一個二維數組寫入文件  回復  更多評論   

    map(...)
    map(function, sequence[, sequence, ...]) -> list

    Return a list of the results of applying the function to the items of
    the argument sequence(s). If more than one sequence is given, the
    function is called with an argument list consisting of the corresponding
    item of each sequence, substituting None for missing values when not all
    sequences have the same length. If the function is None, return a list of
    the items of the sequence (or a list of tuples if more than one sequence).
    2006-01-19 15:49 | weidagang2046

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 综合偷自拍亚洲乱中文字幕| 亚洲国产成人无码AV在线| 特级做A爰片毛片免费69 | 亚洲Av无码精品色午夜| 亚洲色偷拍另类无码专区| 成年女人18级毛片毛片免费 | 国产日韩一区二区三免费高清| 亚欧乱色国产精品免费视频| 久久99久久成人免费播放| 三级黄色免费观看| 亚洲国产精品18久久久久久| 亚洲色一区二区三区四区| 亚洲AV无码成人精品区日韩 | 亚洲国产精品久久久久久| 在线观看亚洲免费| 成人免费视频国产| 国产不卡免费视频| 4338×亚洲全国最大色成网站| 免费看美女被靠到爽的视频| 成在线人永久免费视频播放| 亚洲国产精品自在拍在线播放| 99视频在线精品免费观看6| 97视频免费观看2区| 嘿嘿嘿视频免费网站在线观看| 国产一卡2卡3卡4卡无卡免费视频| 老司机在线免费视频| 成人毛片免费视频| 亚洲AⅤ永久无码精品AA| 免费看的一级毛片| 亚洲精品第一国产综合境外资源 | 免费黄色毛片视频| 亚洲国产成人精品女人久久久 | 4hu四虎免费影院www| 日韩免费在线观看视频| 中文字幕免费视频精品一| 成在人线av无码免费高潮喷水| 每天更新的免费av片在线观看| 久久不见久久见中文字幕免费| 免费一看一级毛片全播放| 亚洲精品国产美女久久久| 亚洲第一区视频在线观看|