系统版本为 Ubuntu 16.04。
首先安装汉语语言包:
The Hacker's Guide to the Algorithm
有这样一个场景:在蛇棋游戏中,总共有 100 个格子,其中有 ladder_num 个格子中有梯子,梯子的作用是让棋子直通到另外一个格子中。用 python 实现梯子功能的代码片段如下:
字符串的访问跟列表一样,用方括号访问,支持切片操作。
python 支持格式化字符串的输出,最基本的用法是字符串中插入 %s
:
const 允许你指定一个语义约束,而编译器会强制执行这项约束,确保某个对象不会被改变。如果某个对象在执行中不应该(或者不会)被改变,就应该使用 const。
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
1 | $ hexo new "My New Post" |
More info: Writing
1 | $ hexo server |
More info: Server
1 | $ hexo generate |
More info: Generating
1 | $ hexo deploy |
More info: Deployment