Foundations of Python: Scopes and Built-ins
Learn how Python finds variables and functions, and master the LEGB rule to write clear, bug-free code.
-
💬
ผู้สอน AI
ถามเกี่ยวกับบทเรียนใดก็ได้ แล้วรับคำตอบที่ชัดเจนทันที ทุกเมื่อ -
🕐
เริ่มเมื่อไรก็ได้
ไม่มีตารางหรือเดดไลน์ — เรียนตามจังหวะของคุณ เมื่อไรก็ได้ -
🌐
เป็นภาษาไทย
บทเรียน แบบฝึกหัด และใบรับรอง — ทั้งหมดเป็นภาษาของคุณอย่างครบถ้วน
เกี่ยวกับคอร์สนี้
Ever wonder why you can use functions like `print()` or `len()` anywhere in your Python code without importing them? The answer lies in Python's scopes, and this course will explain exactly how it works.
You will gain a solid understanding of namespaces and the LEGB (Local, Enclosing, Global, Built-in) rule, which is fundamental to writing predictable and maintainable Python programs. You'll move from confusion about 'NameError' exceptions to confidently structuring your code and understanding how Python manages names.
What you'll learn:
- Understand the core concepts of namespaces and scope in Python.
- Learn the LEGB rule for name resolution and how Python searches for variables.
- Explore the built-in scope and the essential functions, exceptions, and constants it provides.
- Practice identifying the scope of variables in different code blocks (local, global, and enclosing).
- Discover how to use the `dir()` function to inspect the contents of different namespaces.
- Recognize and avoid common errors caused by accidentally overwriting built-in names.
The course begins with the foundational ideas of names and objects before systematically explaining each level of scope. You'll work through clear text-based explanations and code examples to solidify your understanding of these crucial concepts.
This course is designed for beginners in Python. No prior knowledge of scopes or advanced programming concepts is required.
Start building a solid foundation for your Python journey today.
สิ่งที่คุณจะได้รับ
-
📜
ใบประกาศนียบัตร
เพิ่มในโปรไฟล์ LinkedIn ของคุณ -
💬
ติวเตอร์ AI ส่วนตัว
ติดขัดในบทเรียน? ถามติวเตอร์ในตัวของคุณได้ทุกอย่าง ทุกเวลา -
🎧
รวมเวอร์ชันเสียง
เรียนได้ทุกที่ ไม่ต้องดูจอ -
♾️
เข้าถึงตลอดชีพ
กลับมาเรียนได้ตลอด ไม่มีหมดอายุ -
📱
โทรศัพท์หรือคอมพิวเตอร์
ใช้งานได้ทุกที่ ทุกอุปกรณ์ -
💸
คืนเงิน 14 วัน
ไม่ต้องอธิบาย -
⚡
กระชับและตรงประเด็น
2 ชม. 42 นาที เนื้อหาเชิงปฏิบัติ
รีวิว
ยังไม่มีรีวิว — เป็นคนแรกที่แชร์ประสบการณ์
คำถามที่พบบ่อย
ฉันต้องใช้อะไรในการเรียนคอร์สนี้? +
แค่โทรศัพท์หรือคอมพิวเตอร์ที่มีอินเทอร์เน็ต ไม่ต้องติดตั้งหรือใช้อุปกรณ์พิเศษ
ฉันชำระเงินอย่างไร? +
ผ่านบัตรด้วย Stripe เราไม่เก็บข้อมูลบัตร — Stripe จัดการอย่างปลอดภัย
ฉันขอคืนเงินได้ไหม? +
ใช่ — คืนเงินเต็มจำนวนใน 14 วัน ไม่ต้องอธิบาย
ฉันมีสิทธิ์เข้าถึงนานเท่าไร? +
ตลอดไป เมื่อซื้อแล้วคอร์สเป็นของคุณ กลับมาเรียนได้ตลอด
ฉันจะได้ใบประกาศนียบัตรไหม? +
ได้ เมื่อเรียนจบจะได้รับใบประกาศนียบัตรที่เพิ่มในโปรไฟล์ LinkedIn ได้
ออกแบบสำหรับผู้เรียนใน
เทคโนโลยี
ดีไซน์
การเงิน
การตลาด
สาธารณสุข
การศึกษา
ธุรกิจการบริการ
อุตสาหกรรม
×2
เติมครั้งเดียว จ่ายครึ่งเดียว
เพิ่ม AED 360 → รับเครดิต 200 เครดิต ทำให้แต่ละหลักสูตรมีราคาประมาณ AED 45.00 เครดิตไม่มีวันหมดอายุ
AED 360
200 เครดิต
AED 45.00 / คอร์ส
คุ้มที่สุด
AED 900
550 เครดิต
AED 40.91 / คอร์ส
AED 1,800
1200 เครดิต
AED 37.50 / คอร์ส
เครดิตใช้ได้กับทุกคอร์สและไม่หมดอายุ