len() ใน Python ฟังก์ชั่น นับจำนวน ตัวอักษร ในไพทอน
Posted: 07/02/2017 12:22 pm
len() ทำหน้าที่แสดงความยาวของตัวอักษร
Ex. 1
Output 1
Ex. 1
Code: Select all
#-*- coding=utf-8 -*-
str =("Mindphp.com")
print "ความยาวของ Mindphp.com =" ,len(str)