漢諾塔-Python實現

1.漢諾塔核心代碼: 2.字典的用法 disk=dicpole[a][0] //dicpole爲字典 disk=dicpole[a][0] //表示對應列表的第一個數 dicpole[a].pop(0) //pop函數表示從list中刪除第一個數 dicpole[c].insert(0,disk) //insert函數表示從list中添加一個數 range函數: 語法:range(start,st
相關文章
相關標籤/搜索