1. 程式人生 > >python基本語法1.3

python基本語法1.3

exce pre ted cnblogs 基本 python logs ner exp

# -*- coding: utf-8 -*-
#或者寫成下面這種形式
# coding: utf-8
#註意空格的對齊
try: x = 100 y = 200 except IndentationError: print(IndentationError: unexpected indent) # 單行註釋 ‘‘‘ 多行註釋 多行註釋 ‘‘‘ # 多行代碼 str = abcd efgh print(str) # 多行字符串 str = Hello\nworld print(str) str = """Hello world""" print
(str)

python基本語法1.3