That thing inside the brackets is a generator. Here it is, expanded. We need to add a helper variable result, although as it turns out, itʼs useless in this case.
result = []
for i in permutations:
value = print("".join(i))
result.append(value)
It’s a bit strange, as print() returns nothing in Python 3 and yields a syntax error in Python 2. But it indeed prints the values in permutations.