Web Analytics

Python itertools.permutations() Function

Itertoolsโ€ขPermutations

The itertools.permutations() function returns all r-length permutations of elements from an iterable.

Syntax

itertools.permutations(iterable, r=None)

Return Value

An iterator of tuples.

Example

Output
Click Run to execute your code