In this video, we dive deep into the various uses of underscores in Python and how they can help you write cleaner, more maintainable code.
What you'll learn:
1. ⚙️ Single underscores (_) in interactive interpreters and throwaway variables.
2. 🔒 Single leading underscores (_var) for indicating internal use.
3. 🔐 Double leading underscores (__var) for name mangling and avoiding subclass conflicts.
4. ✨ Double leading and trailing underscores (var) for special methods and magic functions.
5. 📦 Leading underscores in module names for indicating internal modules in a package.
We'll also walk through a practical example of structuring a Python package with internal and public modules, demonstrating the importance of using underscores to control the public API. By the end of this video, you'll have a solid understanding of how to use underscores effectively in your Python projects.
⏰ * Time Stamp:
00:00 Introduction of Underscores
00:58 Single Underscore (_) Usage
05:10 Single Leading Underscore (_var) Usage
07:05 Double Leading Underscore (__var) Usage
10:38 Double Leading and Trailing Underscore (__var__) Usage
12:52 Leading Underscore in Module Names (Practical Example: Creating a Python Package)
📁 Source Code: https://github.com/AbhisheakSaraswat/...
👉 *Python NumPy Playlist: • Python Numpy Tutorial
👉 Python Excel Automation: • Excel Automation Using Python
👉 Python Teaser: • A Beautiful Python Programming Teaser | In...
👉 Python Pandas Tutorial: • Python Pandas Tutorial | What is Pandas | ...
👉 Python Playlist: • Python Tutorial for Beginners
👉 Python Data Structure Playlist: • Python Data Structure
👉 Python OOPs Playlist: • Object Oriented Programming Tutorials Usin...
👉 Python Project for Data Analysis- Exploratory Data Analysis | Data Analyst Project : • Python Data Science: Analyzing LinkedIn Co...
👉 Telegram Link: https://t.me/+32-TodtiOvo2Njk9
👉 Medium Story: 📖 / programmingisfun
👉 LinkedIn: / abhisheak-saraswat
👉 ProgrammingIsFun: / 10365183
Auf dieser Seite können Sie das Online-Video Python Underscore (_) Guide Best Practices & Examples mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Programming Is Fun 12 Juli 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 871 Mal angesehen und es wurde von 30 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!