Dec-15-2016, 12:09 AM
(Dec-14-2016, 07:45 PM)PickyBiker Wrote: I have only been using python for about two weeks. I didn't understand the last couple posts and the line below is a mystery to me.
[(x-2)%12 < (10-2)%12 for x in range(12)
This is a 'comprehension'. It generates an array that contains the result of
(x-2)%12 < (10-2)%12
for all values of x
in range(12)
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Your one-stop place for all your GIMP needs: gimp-forum.net