Search found 1 match

by Cilyan
Mon Nov 12, 2012 1:41 am
Forum: Challenges Solved
Topic: A Little Python
Replies: 6
Views: 737

Be warned that this code is no longer valid in Python 3:
- print is a function and should get surrounding parenthesis
- xrange is now range and range no longer exists

Code: Select all

print(sum([x * (x - 1) for x in [y * y for y in range(3,11)]]))