Python

Python map() function — step-by-step Python tutorial on Progressive Robot

Python map() function

URL: https://www.progressiverobot.com/python-map-function/ Python map() function is used to apply a function on all the elements of specified iterable and return map object. Python map object is an [iterator](/community/tutorials/python-iterator), so we can iterate over its elements. We can also convert map object to sequence objects such as [list](/community/tutorials/python-list), [tuple](/community/tutorials/python-tuple) etc. using their factory functions. Python map() […]

Read more
Python Remove Duplicates from a List — step-by-step Python tutorial on Progressive Robot

Python Remove Duplicates from a List

URL: https://www.progressiverobot.com/python-remove-duplicates-from-list/ There are many ways to remove duplicates from a Python List. Using a temporary List and Looping Using [set() built-in method](/community/tutorials/python-set) Using [Dictionary](/community/tutorials/python-dictionary) Keys List count() function [List Comprehension](/community/tutorials/python-list-comprehension) Removing Duplicates from a List Python list can contain duplicate elements. Let's look into examples of removing the duplicate elements in different ways. 1. […]

Read more
Built-in Python 3 Functions for Working with Numbers — step-by-step Python tutorial on Progressive Robot

Built-in Python 3 Functions for Working with Numbers

This tutorial will go through a few of the built-in functions that can be used with numeric data types in Python 3. Becoming familiar with these methods can give you more flexibility when programming. We’ll go over the following functions: abs() for absolute value, divmod() to find a quotient and remainder simultaneously, pow() to raise a number to a certain power, round() to round a number to a certain decimal point, sum() to calculate the sum of the items in an iterable data type.

Read more
CHAT