返回列表 發帖

變數宣告與基本輸出 (一)

本帖最後由 tonyh 於 2022-6-18 13:48 編輯

  1. a=123
  2. b=456
  3. print(a,"python",b)
  4. print(a,"python",b,sep="~")
  5. print(a,"python",b,sep="~",end="!!!\n")
  6. print(str(a)+"~python~"+str(b)+"!!!")
複製代碼
Spyder 環境下常用快捷建

Ctrl+1    單行註解  
Tab    簡易智慧輸入 (輸入部分文字後按 Tab 鍵)
Ctrl+Alt+向下方向鍵    向下做單行複製
Ctrl+D    刪除單行
Ctrl+Z    回到上一步
Ctrl+I    查看Help
F5    執行程式

  1. a=123
  2. b=456
  3. print(a,"python",b)
  4. print(a,"python",b,sep="~")
  5. print(a,"python",b,sep="~",end="!!!\n")
  6. print(a,"python",b,sep="~",end="!!!")
複製代碼

TOP

  1. a = 123
  2. b = 345
  3. print(a, "python", b)
  4. print(a, "python", b, sep = "~")
  5. print(a, "python", b, sep = "~", end = "!!!\n")
  6. print(str(a) + "~python~"  +str(b) + "!!!")
複製代碼

TOP

返回列表