17 ตัวอย่าง Code การใช้งาน Python

15-ส.ค.-18

คัมภีร์เทพ IT

หากใครที่ใช้ภาษา Python หรือกำลังสนใจศึกษาภาษา Python อยู่ ห้ามพลาดบทความนี้ เพราะนี่เป็น 17 ตัวอย่าง Code ของภาษา Python ที่ใช้ในเรื่องต่างๆ ซึ่งมีประโยชน์และช่วยย่นเวลาการเรียนรู้ไปได้มาก มาดูกันว่ามีอะไรบ้าง

Swapping values

Create a single string from all the elements in list

Find The Most Frequent Value In A List.

Checking if two words are anagrams

Reverse a String

Reverse a list

Transpose 2d array

Chained Comparison

Chained function call

Copying List

Dictionary Get

Sort Dictionary by Value

For Else

Convert list to comma separated

Merge dict’s

Min and Max index in List

Remove duplicates from a list

หวังว่าคนที่กำลังศึกษา Python อยู่ น่าจะเข้าใจวิธีการใช้งาน และสามารถนำเอาตัวอย่าง Code เหล่านี้ ไปปรับใช้ได้นะครับ

ที่มา:  https://hackernoon.com/

 

 

รับตำแหน่งงานไอทีใหม่ๆ ด้วยบริการ IT Job Alert

 

อัพเดทบทความจากคนวงในสายไอทีทาง LINE ก่อนใคร
อย่าลืมแอดไลน์ @techstarth เป็นเพื่อนนะคะ

เพิ่มเพื่อน

 

บทความที่เกี่ยวข้อง