ตัวอย่างโปรแกรมรับค่าข้อความและแสดงผลออกทางหน้าจอ

1

>>>name = input()

2

>>>print("My name is ",name)

3

>>>surname = input()

4

>>>print("My surname is ",surname)


Print output (ตัวอย่างผลลัพธ์ที่ได้)

ชื่อที่พิมพ์ (input)

My name is ชื่อที่พิมพ์ (input)

นามสกุลที่พิมพ์ (input)

My surname is นามสกุลที่พิมพ์ (input)