<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 閱讀(4872) 評論(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

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


    網站導航:
    博客園   IT新聞   Chat2DB   C++博客   博問  
     
    主站蜘蛛池模板: 免费国产黄网站在线观看动图| 亚洲精品NV久久久久久久久久| 亚洲国产精品成人精品软件| 午夜亚洲国产精品福利| 2019中文字幕在线电影免费 | 国产麻豆一精品一AV一免费| 又黄又大的激情视频在线观看免费视频社区在线 | 亚洲精品视频免费看| 国产在线精品一区免费香蕉| 国产美女亚洲精品久久久综合| 国产午夜成人免费看片无遮挡| 亚洲五月午夜免费在线视频| 国产成人免费高清激情视频| 人人公开免费超级碰碰碰视频| 亚洲av永久无码精品国产精品| 成人免费视频试看120秒| free哆啪啪免费永久| 国产成年无码久久久免费| 亚洲人成未满十八禁网站| 久久久久久久亚洲Av无码| 亚洲国产综合自在线另类| 亚洲国产天堂在线观看| 日韩毛片免费在线观看| 天天干在线免费视频| 亚洲国产精品福利片在线观看| 亚洲av再在线观看| 亚洲啪啪综合AV一区| 亚洲一区精品无码| 亚洲国产成人一区二区精品区 | 亚洲色婷婷综合久久| 亚洲国产精品自在线一区二区| 亚洲国产精品久久久久网站| 亚洲va无码va在线va天堂| 久久亚洲精品无码aⅴ大香| 中国一级毛片免费看视频| 免费一级毛片正在播放| 亚洲一区二区三区丝袜| 无码中文字幕av免费放| 亚洲一区二区三区免费视频| 免费h片在线观看网址最新| 亚洲欧洲日产专区|