Function str (Example Python Built-in Functions)

Comments   0   Date Arrow  November 28, 2008 at 9:37am   User  by pichai

str(object)
แปลง object ที่ส่งเข้าไปกลับมาในรูปแบบ string
>>> str(123)
‘123′
>>> str(50.99)
‘50.99′
>>> str(['Hello','World'])
“['Hello', 'World']”

Tagged   Talk  delicious  Comments  Add Your Comment