RE: Python Challenge 12-12-2015, 07:59 PM
#11
(12-12-2015, 01:22 PM)Megan Wrote:Code:#!/usr/bin/env python diamond = [" *"," ***"," *****","*******"," *****"," ***"," *"] var = 0 while var == 0: while var < 7: print diamond[var] var += 1
Whilst technically the first loop does absolutely nothing, it does actually count as a loop and so the second loop counts as the nested loop so yeah, 8 lines long, would love more challenges like this!
For gosh sake, use Python 3+!

I'll let this one pass because I like it, but... technically wouldn't this be printing multiple asterisks each iteration breaking one of the rules? What do you think?






![[+]](https://sinister.li/images/modern/collapse_collapsed.png)




![[Image: 9JVyFsC.png]](http://i.imgur.com/9JVyFsC.png)