作者查詢 / mantour

總覽項目: 發文 | 留言 | 暱稱
作者 mantour 在 PTT [ Python ] 看板的留言(推文), 共186則
限定看板:Python
Re: [教學] 排序問題
[ Python ]8 留言, 推噓總分: +2
作者: mantour - 發表於 2009/11/16 22:11(16年前)
2Fmantour:樓上的方法 剛剛還沒看仔細就被刪了XD 沒學到><11/16 22:17
3Fmantour:可以再po一下嗎 ~~11/16 22:17
5Fmantour:嗯 對呀 要知道輸入的規則和確切想要排的方式11/16 22:21
6Fmantour:反正給個例子 有其他需求就請原PO自己改囉11/16 22:22
Re: [教學] 排序問題
[ Python ]9 留言, 推噓總分: +5
作者: g9678007 - 發表於 2009/11/16 21:27(16年前)
2Fmantour:因為字串的大小是一個字元一個字元比吧11/16 21:46
4Fmantour:就跟有些檔名排序 pic10.jpg 會排在 pic2.jpg的前面一樣11/16 21:48
5Fmantour:所以就是要問怎樣可以做到呀…11/16 21:49
6Fmantour:除了自己寫一個sort函式,目前還沒想到好方法11/16 21:49
7Fmantour:或是自己寫一個class, override __gt__() 函式11/16 21:55
8Fmantour:喔喔 看了help , 發現sort可以傳入自訂的cmp函式11/16 21:56
[教學] 排序問題
[ Python ]12 留言, 推噓總分: +2
作者: g9678007 - 發表於 2009/11/16 19:10(16年前)
10Fmantour:只看小數點後的部份吧 3<11<13 這樣11/16 22:16
[問題] 字元byte數 跟 try 敘述問題
[ Python ]4 留言, 推噓總分: +1
作者: wil771126 - 發表於 2009/10/19 23:50(16年前)
1Fmantour:把try放在for裏面然後except給他pass?10/19 23:55
[問題] 顯示色彩
[ Python ]8 留言, 推噓總分: 0
作者: joyce7216 - 發表於 2009/09/28 22:47(16年前)
3Fmantour:這跟python無關 是你的console不支援ansi色碼09/28 23:21
[問題] .py 內的帳號/密碼如何加密?
[ Python ]11 留言, 推噓總分: +7
作者: bobhsiao - 發表於 2009/05/24 15:14(16年前)
5Fmantour:你可以把加密後的密碼寫在py檔內,但解密的程式碼也會在05/25 22:46
6Fmantour:同一個程式碼內,這樣好像沒有意義?05/25 22:46
[問題] copy dict instance ?
[ Python ]2 留言, 推噓總分: +1
作者: tumc - 發表於 2008/07/27 03:50(17年前)
1Fmantour:import copy07/27 04:08
2Fmantour:y=copy.deepcopy(x)07/27 04:09
[問題] file讀取問題
[ Python ]7 留言, 推噓總分: +1
作者: pinkisme - 發表於 2008/07/21 00:27(17年前)
6Fmantour:要先在__init__()裡面初始化data這個attribute才能在其他07/21 08:46
7Fmantour:method裏面使用他喔07/21 08:46
Re: [問題] 奇怪的問題...
[ Python ]4 留言, 推噓總分: +3
作者: mantour - 發表於 2008/03/27 17:51(18年前)
2Fmantour:謝謝03/27 19:16
Re: [問題] tuple 轉成 dictionary
[ Python ]5 留言, 推噓總分: +4
作者: Tiberius - 發表於 2008/03/17 09:33(18年前)
3Fmantour:推這篇和一樓的方法…又學到一招03/18 04:18