# แนะนำภาษา python

python เวอร์ชั่นปัจจุบัน คือ 3.6 (19 มิถุนายน 2560) เป็น high-level language มีการแปลภาษาแบบ interpreter คือทำทีละบรรทัด เป็นภาษาที่เรียนรู้ได้ง่าย

ในชีวิตประจำวัน python ถูกนำมาใช้งานหลายอย่าง เช่นการทำ back-end ของ dynamic website, ใช้ในงาน data science, การเขียนโปรแกรมลงบน hardware สำหรับงาน embedded system เป็นต้น\
สามารถดาวน์โหลด python มาใช้งานได้ที่ <https://www.python.org/downloads/> และมี document วิธีการเขียนโปรแกรมด้วยภาษา python ที่ <https://docs.python.org/3/library/>

เราสามารถใช้ editor ในการเขียนโปรแกรมภาษา python ได้หลากหลายโปรแกรม เช่น notepad++, sublinetext, pyCharm เมื่อเราติดตั้งตัว python แล้ว ก็สามารถ run source code ภาษา python ได้

ความแตกต่างของ python 2.7 vs python 3.3 ถึงเวอร์ชั่นปัจจุบันจะเป็น python 3.x แต่มีบางโปรแกรมและบางหน่วยงานใช้ python 2.7 อยู่ ดังนั้นเราจะมาดูความแตกต่างกันระหว่าง 2 เวอร์ชั่นนี้

<table><thead><tr><th width="184.90899062327634"></th><th>python 2.7</th><th>python 3.x</th></tr></thead><tbody><tr><td>Print</td><td><code>print “hello world”</code></td><td><code>print (“hello world”)</code></td></tr><tr><td>Integer Division</td><td>3/2 = 1</td><td>3/2 = 1.5</td></tr><tr><td>Input Value</td><td><code>raw_input()</code></td><td><code>input()</code></td></tr><tr><td>Stripline in File</td><td><code>string.spilt(f.read(), “\n”)</code></td><td><code>f.read().strip().splitlines()</code></td></tr><tr><td>File Mode</td><td>rb, wb, ab</td><td>r+, w+, a+</td></tr></tbody></table>

การเลือกใช้ python ขึ้นอยู่กับโปรแกรมที่รองรับ และปัจจัยอื่นๆ ที่นอกเหนือจากความใหม่ของเวอร์ชั่น


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mikkicoding.mikkipastel.com/python-for-beginner/01-introduce-python.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
