I have this short piece of code I found online for converting an integer into a list of it's separated integers (like 250 becomes [2, 5, 0] etc).
num = 213
res = [int(x) for x in str(num)]
print(res)
The thing is I am just thoroughly confused about how it works and was wondering if you guys could help me understand. Thank you