^^Python. Built-in Function.

pylib/Built-in Functions

 

dir()
  • return the list of names in the current local scope.
  • With an argument, attempt to return a list of valid attributes for that object.
id(object) Return the “identity” of an object. This is an integer which is guaranteed to be unique and constant for this object during its lifetime. Two objects with non-overlapping lifetimes may have the same id() value.

CPython implementation detail: This is the address of the object in memory.

iter() called on an iterable, returns an iterator object for that iterable
len()  
list() Rather than being a function, list is actually a mutable sequence type >>> 
map(f,iter) map(function, iterable, ...)    Return an iterator that applies function to every item of iterable, yielding the results. 

list(map(len, ['a', 'aaa', 'aa']))    >>> [1, 3, 2]

open() The standard way to open files for reading and writing with Python.
sorted() sorted(iterable, *, key=None, reverse=False)

see Sorting HOW TO. A common pattern is to sort complex objects using some of the object’s indices as keys.

tup = (s, fnp)
dfn_list.append(tup)
dfn_list = sorted(dfn_list, key = lambda tup: tup[0].lower())

str() return a string version of object  lib/stdtypes#str.  | String Type.
sum() sum(iterable, start=0)

Better

''.join(sequence)    concatenate a sequence of strings

math.fsum()          to add floating point values with extended precision.

itertools.chain()     to concatenate a series of iterables.

es: sum( f(x) for x in X )  esempio con list comprehension

zip(iter)

zip(*iter)

zip(*iter)  cioe' unzip