Methods, Function, Package, Numpy

 









Example

















Method เป็น function ที่อยู่ object ของ python

Method จะเป็นแบบไหน ขึ้นอยู่กับ ชนิดของ object เช่น ถ้าเป็น float ก็จะมี method “count” หรือถ้าเป็น string method ก็จะเป็น index หรือ capitalize













Error ข้างล่างแสดงถึง method “replace” ไม่สามารถใช้ได้กับ object ที่เป็น list ใช้ได้กับ object ที่เป็น string










One package contains many Python scripts and each script or module performs a particular function.










Prior to installing the Python package, the computer requires pip in order to download packages.













Numpy is the package which executes a particular task throughout the list.



























The variable in the numpy array has to be the same type, otherwise it may cause the error once you execute a particular function.


































Comments

Popular posts from this blog

Useful links (updated: 2024-04-26)

Genome editing technology short note

SUSA Thailand - Sustainable University? (update 2023-06-23)