Understanding Python's Built-in sorted() Function
Core Concept
sorted() is Python's built-in function for sorting iterable collections. It always returns a new sorted list, and leaves the original input iterable unmodified.
Basic Syntax
sorted(iterable, *, key=None, reverse=False)
iterable: Any iterable object to be sorted, such as lists, tuples, strings, dictionaries, etc.
key: A optional p ...
Posted on Tue, 19 May 2026 17:50:32 +0000 by Switch0r
Commonly Used Built-in Functions in Python
Python provides a rich set of built-in functions that can be used directly without importing any libraries. Below are some commonly used built-in functions along with brief descriptions and examples.
1. Mathematical Funtcions
# Returns absolute value
>>> abs(-5)
5
# Returns the power; if third argument is given, returns remainder afte ...
Posted on Sat, 16 May 2026 13:48:25 +0000 by atravotum
Optimizing Loop Performance in Python: Why Native Loops May Be Slower Than You Think
Understanding Loop Performence in Python
Python's execution speed has always been a topic of discussion among developers. The language is known for readability and ease of use, but not necessarily for raw performance. This becomes particularly evident when dealing with repetitive operations like loops.
When a single operation takes one unit of ...
Posted on Thu, 07 May 2026 22:56:25 +0000 by atawmic