PenguinPower🐧🇫🇮
banner
penguinnpower.bsky.social
PenguinPower🐧🇫🇮
@penguinnpower.bsky.social
Tech dude. #Peace #stopwar #DevOps #Kubernetes #Linux #AWS #GoogleCloud #Azure #Python #DSA
And lastly

zip()
zip() combines two or more iterables into pairs (tuples).
May 25, 2025 at 10:31 AM
filter()
Use filter() to create a list of items that meet a certain condition.
May 25, 2025 at 10:31 AM
map()
map() applies a function to every item in an iterable, returning the result.
May 25, 2025 at 10:30 AM
enumerate()
Use enumerate() to loop through a list and get both the index and the item at the same time.
May 25, 2025 at 10:30 AM
range()
range() creates a sequence of numbers, useful for loops.
May 25, 2025 at 10:30 AM
sorted()
Use sorted() to get a sorted version of a list or other iterable, without changing the original.
May 25, 2025 at 10:30 AM
sum()
sum() adds up all the numbers in a list or other iterable.
May 25, 2025 at 10:29 AM
min()
Use min() to get the smallest item in a list or other iterable.
May 25, 2025 at 10:29 AM
max()
max() returns the largest item in a list or other iterable.
May 25, 2025 at 10:29 AM
len()
Use len() to get the number of items in a list, string, or dictionary.
May 25, 2025 at 10:28 AM
popitem()
popitem() removes and returns a random item from a dictionary.
May 25, 2025 at 10:28 AM
update()
Use update() to add multiple items to a set.
May 25, 2025 at 10:28 AM
discard()
discard() removes an item from a set. It doesn’t cause an error if the item doesn’t exist.
May 25, 2025 at 10:28 AM
add()
You can use add() method to add an item to a set. Sets automatically avoid duplicates.
May 25, 2025 at 10:27 AM
clear()
clear() method removes all the items from a dictionary or set, making it empty.
May 25, 2025 at 10:27 AM
items()
Use items() method to get both the keys and values in a dictionary as pairs.
May 25, 2025 at 10:27 AM
values()
values() method gives you all the values in a dictionary.
May 25, 2025 at 10:27 AM
keys()
You can use keys() to get all the keys from a dictionary.
May 25, 2025 at 10:27 AM
get()
When you use get() method it will get the value of a key in a dictionary. If the key doesn’t exist, it returns None instead of an error.
May 25, 2025 at 10:27 AM
find()
You can use find() method to look for a specific part in a string. It returns the position of the first match, or -1 if not found.
May 25, 2025 at 10:26 AM