Tag

code-examples

0 views collected around this technical thread.

Test Development Learning Exchange
Test Development Learning Exchange
Nov 11, 2024 · Fundamentals

36 Frequently Used Python Built-in Functions with Usage Scenarios and Code Examples

This article presents 36 commonly used Python built‑in functions, describing each function’s purpose, typical use cases such as debugging, data conversion, iteration, and includes concise code snippets demonstrating how to apply them, helping readers improve programming efficiency and understanding.

built-in-functionscode-examplesfundamentals
0 likes · 11 min read
36 Frequently Used Python Built-in Functions with Usage Scenarios and Code Examples
Test Development Learning Exchange
Test Development Learning Exchange
Sep 7, 2024 · Fundamentals

Understanding the Underscore (_) in Python: Uses and Conventions

This article explains the versatile uses of the underscore (_) in Python, covering temporary variables in REPL, loop placeholders, tuple unpacking, translation functions, numeric literals, naming‑conflict avoidance, protected and private attributes, and special magic methods, with clear code examples for each case.

Naming Conventioncode-examplesunderscore
0 likes · 6 min read
Understanding the Underscore (_) in Python: Uses and Conventions
Test Development Learning Exchange
Test Development Learning Exchange
Aug 3, 2024 · Fundamentals

Understanding Python Magic Methods: __bool__, __int__, __float__, __complex__, __index__, __oct__, __hex__, and __dir__

This article explains Python's special (magic) methods such as __bool__, __int__, __float__, __complex__, __index__, __oct__, __hex__, and __dir__, describing their purpose, how they affect object behavior, and provides concrete code examples demonstrating their usage and output.

Magic MethodsPythonSpecial Methods
0 likes · 5 min read
Understanding Python Magic Methods: __bool__, __int__, __float__, __complex__, __index__, __oct__, __hex__, and __dir__
Test Development Learning Exchange
Test Development Learning Exchange
Jun 27, 2024 · Fundamentals

Understanding Python Decorators: Concepts, Use Cases, and Code Examples

Python decorators are special functions that wrap other functions or classes to add functionality without modifying their source code, and this guide explains their principles, common use cases such as logging, timing, caching, and permission checks, and provides ten practical code examples illustrating various decorator patterns.

code-examplesdecoratorsprogramming
0 likes · 7 min read
Understanding Python Decorators: Concepts, Use Cases, and Code Examples
Test Development Learning Exchange
Test Development Learning Exchange
Jun 17, 2024 · Fundamentals

Common Python Built‑in Functions with Example Code

This article introduces a collection of essential Python built‑in functions such as print, len, type, conversion utilities, data‑structure constructors, iteration helpers, and numeric helpers, each illustrated with concise example code snippets to demonstrate their typical usage.

PythonTutorialbuilt-in-functions
0 likes · 5 min read
Common Python Built‑in Functions with Example Code