> For the complete documentation index, see [llms.txt](https://jen-hsuan-hsieh.gitbook.io/python/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jen-hsuan-hsieh.gitbook.io/python/chapter1notes-from-research/chapter-2-write-python-code/2basic-knowledges.md).

# 3.2.Basic knowledges

* 1.Lines and Indented Block是使用{}來作為function或class區塊的畫分, 而是使用line indentation
  * 在同一個block的code, line indentation的數量必須相同
  * error condition

    ```
      if True:
          print "Answer"
          print "True"
      else:
          print "Answer"
        print "False"
    ```
* 2.Multi-Line Statements
  * Python中使&#x7528;**\\**&#x4F5C;為連接換行

    ```
      total = item_one + \
              item_two + \
              item_three
    ```
* 3.Comments (註解)
  * Python使用hash(#)

    ```
      # First comment
      print "Hello, Python!" # second comment
    ```
* 4.Waiting for the User
  * raw\_input

    ```
      print "Enter a file name:"
      filename = raw_input()
    ```
