On Fri, Aug 19, 2011 at 22:02, Jonathan Wilson <[email protected]> wrote: > On Fri, Aug 19, 2011 at 3:03 PM, Alan Young <[email protected]> wrote: >> On Fri, Aug 19, 2011 at 12:49, Aaron Toponce <[email protected]> wrote: >>> python -c 'for i in range(1,101):print"FizzBuzz"[i*i%3*4:8--i**4%5]or i' > > Its called slicing, and it lets you select a chuck of data out of > lists, tuples, strings, and other data structures
That fits what I thought and was able to find out, but I'm still confused by the '8--i**4%5' ... specifically, the '--' part. -- Alan Young -------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list
