作者查詢 / handsomeLin

總覽項目: 發文 | 留言 | 暱稱
作者 handsomeLin 在 PTT [ Python ] 看板的留言(推文), 共220則
限定看板:Python
[問題] leetcode 203 linked list移除element
[ Python ]6 留言, 推噓總分: +5
作者: typhoonss821 - 發表於 2018/10/07 00:23(7年前)
4FhandsomeLin: 第一行是dummy node 第二行是把dummy node連到head10/08 12:02
5FhandsomeLin: 我建議你寫linked list不懂就畫圖10/08 12:15
[問題] 刪除元素的問題
[ Python ]15 留言, 推噓總分: +3
作者: beebearwm - 發表於 2018/10/03 08:46(7年前)
3FhandsomeLin: 應該是return filter(T, lambda x: True if x != E e10/03 09:33
4FhandsomeLin: lse False)10/03 09:33
6FhandsomeLin: 說反了10/03 09:33
7FhandsomeLin: return filter(T, lamba x: True if x != E else Fal10/03 09:34
8FhandsomeLin: se)10/03 09:34
10FhandsomeLin: return filter(T, lambda x: x!=E) 其實這樣就好了10/03 09:36
11FhandsomeLin: 耍蠢了10/03 09:36
12FhandsomeLin: 乾又蠢了 list跟lambda對調10/03 09:37
Re: [問題] 新手list問題請教
[ Python ]9 留言, 推噓總分: +4
作者: handsomeLin - 發表於 2018/09/26 13:38(7年前)
6FhandsomeLin: 這位大大你的code reverse了東西兩次呢09/27 23:29
7FhandsomeLin: 還有你的字串長度hard code了...09/27 23:30
Re: [問題] 新手list問題請教
[ Python ]4 留言, 推噓總分: +1
作者: rexyeah - 發表於 2018/09/26 11:15(7年前)
3FhandsomeLin: 不是 只有最後一位加1 其他照常進位09/26 13:16
[問題] 新手list問題請教
[ Python ]13 留言, 推噓總分: +4
作者: chinsun - 發表於 2018/09/26 10:20(7年前)
1FhandsomeLin: 感覺你不需要寫一個class 所以應該不用self 還是你09/26 10:33
2FhandsomeLin: 的class繼承list?09/26 10:33
3FhandsomeLin: 第二感覺你邏輯錯誤 這題感覺是把整個list當一個數09/26 10:37
4FhandsomeLin: 然後各位數加1吧? 你remove了全部的9看起來意義不09/26 10:37
5FhandsomeLin: 明,這題list中如果都是string 你應該用hashmap映射09/26 10:38
6FhandsomeLin: 加1後的值 如果加1變0的話處理下一個進位 如果不用進09/26 10:38
8FhandsomeLin: 位就斷掉loop 第二種情況是首位是0那就加一位在前面09/26 10:38
9FhandsomeLin: 既然你有處理的function 那就先把list裡的字串先處理09/26 10:50
10FhandsomeLin: 數字阿...09/26 10:50
[問題] 函數中下標或是呼叫另一個檔案
[ Python ]12 留言, 推噓總分: +1
作者: majoyun - 發表於 2018/09/21 23:07(7年前)
11FhandsomeLin: 因為你的dict不是index 0-4啊09/24 08:28
12FhandsomeLin: 而且你的dict沒有value 看不太懂09/24 08:29
[閒聊] 製作gui介面 這方法會很怪嗎
[ Python ]9 留言, 推噓總分: +3
作者: frrr - 發表於 2018/09/11 01:08(7年前)
1FhandsomeLin: 瀏覽器支援JS而已09/11 02:46
2FhandsomeLin: JS能做出來的東西應該更炫砲09/11 02:47
[問題] leetcode 23
[ Python ]4 留言, 推噓總分: +2
作者: sean72 - 發表於 2018/08/29 02:34(7年前)
4FhandsomeLin: 因為第一個一樣 比第二個08/29 10:59
[問題] 宣告出問題消失
[ Python ]2 留言, 推噓總分: +2
作者: s1021412107 - 發表於 2018/08/24 16:51(7年前)
2FhandsomeLin: 用commandline執行py並代參數即解決08/24 17:35
[問題] 無法啟動
[ Python ]6 留言, 推噓總分: +5
作者: g318 - 發表於 2018/08/21 22:40(7年前)
1FhandsomeLin: 上面寫了前面加conda...08/22 03:05
2FhandsomeLin: 其實我是覺得你已經activate了08/22 03:14