I came across this useful bit of code that returns the indexes of the minimum values of a list l
[i for i, x in enumerate(l) if x == min(l)]
Could someone help me with what this way of creating a list is called and/or what the process is?
I'm familiar with [i*2 for i in l] type code but I'm not familiar with what the comma does and what the reason for defining a new variable x is.
Many Thanks