01python foundation _01 code writing precautions _continuous update



  1. Explain the compilation method used

 

  1 #!/usr/bin/python

 

   2. Explain the character encoding method

 

  1 #coding:utf-8

 

   3. The default output of print is a newline. If you want to achieve no newline, you need to add a comma at the end of the variable

 

  # Output 1 print x,

2 print y,

3 print x, y   without

 

  newline

 

Getting Started for Programmers + \

2 item_two + \

3 item_three

 

  5. Statements containing [], {} or () brackets do not need to use multi-line connectors

 

  1 days = ['Monday', 'Tuesday', 'Wednesday',

2 'Thursday', 'Friday']



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326443856&siteId=291194637