2018年10月22日-Python day1
生活随笔
收集整理的這篇文章主要介紹了
2018年10月22日-Python day1
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
希望有一個好的未來!!!
?
執行一個.py文件只能在命令行模式執行,如果敲一個命令python hello.py,看到如下錯誤:
┌────────────────────────────────────────────────────────┐ │Command Prompt _ □ x │ ├────────────────────────────────────────────────────────┤ │Microsoft Windows [Version 10.0.0] │ │(c) 2015 Microsoft Corporation. All rights reserved. │ │ │ │C:\> python hello.py │ │python: can't open file 'hello.py': [Errno 2] No such │ │file or directory │ │ │ │ │ │ │ │ │ │ │ └────────────────────────────────────────────────────────┘小結
在Python交互式模式下,可以直接輸入代碼,然后執行,并立刻得到結果。
在命令行模式下,可以直接運行.py文件。
?轉載于:https://www.cnblogs.com/diandianchao/p/9831963.html
總結
以上是生活随笔為你收集整理的2018年10月22日-Python day1的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 1月16日学习内容整理:存储库Mongo
- 下一篇: 数据结构与算法(一) 线性表之顺序表