python
Bongii
这个作者很懒,什么都没留下…
展开
-
【python】if __name__ =='__main__'
以下程序为验证代码#pytorch_test.pyprint("I'm the first.")print(__name__)if __name__ =='__main__': print("I'm the second.")pytorch_test.py的运行结果为:#test.pyimport pytorch_testprint(__name__+'123')test...原创 2020-03-30 19:40:03 · 168 阅读 · 0 评论 -
\r和\n的区别
\r : return 到当前行的最左边。\n: newline 向下移动一行,并不移动左右。Linux中\n表示回车+换行;Windows中\r\n表示回车+换行。Mac中\r表示回车+换行。历史:回车”(Carriage Return)和“换行”(Line Feed)这两个概念的来历和区别。 在计算机还没有出现之 前,有一种叫做电传打字机(Teletype Model ...转载 2019-02-22 10:39:51 · 567 阅读 · 0 评论