
Linux
elulis
这个作者很懒,什么都没留下…
展开
-
Linux下常用的文件系统命令
移动、重命名mv oldPathName newPathName删除非空文件夹rm -Rf dirPathName压缩文件、文件夹zip -r zipArchievePathName targetPathName解压缩文件夹unzip zipArchievePathName -d targetDirPathName...2010-04-13 16:04:03 · 153 阅读 · 0 评论 -
3 ways of Y?X:Z in python
C和java中的 A=Y?X:Z;到了python中有3中写法。python中and和or运算符总会返回lhs或者rhs。所以有了在2.5版本之前常见的方式:a=((X and Y) or Z) #前提,Y为真。分析:如果X为真,则(X and Y)返回Y,(Y or Z)也是返回Y;如果X为假,则(X and Y)返回X,(X or Z)返回Z。到了2.5版本...2011-03-25 02:16:44 · 137 阅读 · 0 评论