ทำความรู้จักกับภาษา python (23) : การใช้ from...import (ฟอร์ม...อิมพอร์ต) ในภาษา python (ไพทอน)
Moderators: mindphp, ผู้ดูแลกระดาน
- chatee supasand
- PHP VIP Members
- Posts: 1666
- Joined: 04/06/2019 10:06 am
- jirawoot
- PHP VIP Members
- Posts: 3130
- Joined: 17/06/2019 10:30 am
Re: ทำความรู้จักกับภาษา python (23) : การใช้ from...import (ฟอร์ม...อิมพอร์ต) ในภาษา python (ไพทอน)
หน้าฟังก์ชั่น
หน้าเรียกใช้
ผลลัพธ์
from...import
หน้าฟังก์ชั่น
หน้าเรียกใช้
ผลลัพธ์
from...import*
หน้าฟังก์ชั่น
หน้าเรียกใช้
ผลลัพธ์
Code: Select all
var_string = "mindphp"
def func1(arg):
print('ฟังก์ชั่นที่ 1 =', arg)
return
def func2(arg):
print('ฟังก์ชั่นที่ 2 = ',arg)
return
Code: Select all
import module_myarg
module_myarg.func1('python')
module_myarg.func2('train')
หน้าฟังก์ชั่น
Code: Select all
var_string = "mindphp"
def func1(arg):
print('ฟังก์ชั่นที่ 1 =', arg)
return
def func2(arg):
print('ฟังก์ชั่นที่ 2 = ',arg)
return
Code: Select all
from module_myarg import func1
func1('hello')
หน้าฟังก์ชั่น
Code: Select all
var_string = "mindphp"
def func1(arg):
print('ฟังก์ชั่นที่ 1 =', arg)
return
def func2(arg):
print('ฟังก์ชั่นที่ 2 = ',arg)
return
Code: Select all
from module_myarg import *
func1('hello')
func2('python')
-
- Similar Topics
- Replies
- Views
- Last post
-
- 8 Replies
- 2351 Views
-
Last post by bolue
09/06/2020 10:22 am
-
-
ทำความรู้จักกับภาษา python (22) : การสร้าง Module (โมดูล) ใน python (ไพทอน)
by dawthana » 12/01/2017 11:33 am » in Python Knowledge - 9 Replies
- 1838 Views
-
Last post by jirawoot
20/06/2019 6:44 pm
-
-
-
ทำความรู้จักกับภาษา python (5) : การกำหนดตัวแปร python (ไพทอน)
by dawthana » 28/12/2016 11:41 am » in Python Knowledge - 7 Replies
- 1679 Views
-
Last post by jirawoot
19/06/2019 1:55 pm
-
-
-
ทำความรู้จักกับภาษา python (15) : การสร้างฟังก์ชันใน python (ไพทอน)
by dawthana » 30/12/2016 3:38 pm » in Python Knowledge - 9 Replies
- 1460 Views
-
Last post by jirawoot
20/06/2019 2:49 pm
-
-
-
ทำความรู้จักกับภาษา python (4) : ตัวดำเนินการใน python (ไพทอน)
by dawthana » 28/12/2016 10:05 am » in Python Knowledge - 11 Replies
- 1388 Views
-
Last post by Sirayu
19/06/2019 11:56 am
-
-
-
ทำความรู้จักกับภาษา python (1) : ความรู้เกี่ยวกับภาษา python (ไพทอน)
by dawthana » 27/12/2016 1:35 pm » in Python Knowledge - 3 Replies
- 1223 Views
-
Last post by chatee supasand
06/06/2019 3:44 pm
-
-
-
ทำความรู้จักกับภาษา python (2) : เครื่องมือที่ใช้ในการเขียน python (ไพทอน)
by dawthana » 27/12/2016 7:58 pm » in Python Knowledge - 3 Replies
- 971 Views
-
Last post by chatee supasand
06/06/2019 4:42 pm
-
-
-
ทำความรู้จักกับภาษา python (14) : การจัดการข้อผิดพลาดใน python (ไพทอน)
by dawthana » 30/12/2016 2:40 pm » in Python Knowledge - 9 Replies
- 1638 Views
-
Last post by jirawoot
20/06/2019 2:28 pm
-
Who is online
Users browsing this forum: No registered users and 13 guests