Skip to content

Instantly share code, notes, and snippets.

@Celia-code
Last active March 30, 2020 03:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Celia-code/fb2e0775b90140d237e0b4e4a54f7313 to your computer and use it in GitHub Desktop.
Save Celia-code/fb2e0775b90140d237e0b4e4a54f7313 to your computer and use it in GitHub Desktop.
if語句
name = 'Python'
if name == 'Python': # 判斷變量是否为'Python'
print("Hello World") # 打印Hello World
else:
print(name) # 條件不成立,打印出變量name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment