公输目

公输目

愿有岁月可回首,且以深情共白头。

pythoner
gshmu
  • Category
    • Config2
    • Git2
    • Linux11
    • MySQL1
    • Other4
    • Python6
    • regex1
  • Tag
    • advanced6
    • bash1
    • bool2
    • bug1
    • byobu1
    • config6
    • debug1
    • deploy1
    • django1
    • force1
    • git2
    • grub1
    • idea1
    • life5
    • linux5
    • lvs1
    • mysql1
    • play3
    • python6
    • pythonic2
    • regex1
    • slice1
    • sys1
    • tuple1
    • wol1
  • Archive
    • 20241
    • 20173
    • 20166
    • 20156
    • 201412
  • Homepage
  • By Year
  • Chan
  • Github
  • RSS

4>3>2

2014-09-19
  • Python
  • bool
  • python
  • pythonic

在我看来,python不仅是程序,还是艺术。

4>3>2

1
2
In [1]: 4>3>2
Out[1]: True

懂程序的都知道,4>3 and 3>2不能写成4>3>2(4>3求值后是True,也就是1)。可是他们不懂python,4>3>2学过数学的都知道,对的就是对的啊。python推荐这么写,这么写效率更好。

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
© 2024 公输目 - Powered by Hexo - Theme Chan