Python itertools.permutations() Function
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