Yesterday, I came up with working logic of list comprehension, the objective is to look for files of particular extension and some folders and put them into textScrollList in maya. I was doing this for my Mini Me project. As far as my learning is list comprehension can be somewhat useful to make the code to fewer lines but they are as much memory intensive as a code written in multiple lines, and the real advantage is it is more readable where as the list comprehension are not readable at first glance.
the first 3 lines can be written in one line using list comprehension
now that we got the folder now lets add some files to the textScrollList
well the number of lines have been reduced but it is less readable as compare to the 7 lines of code above.
Other Blogs & Pages
Animation & VFX SitesA MUST READ for Ani/VFX Artists
awakened by thoughts,