- if len(results) > 3:
- notice("showing 3 of " + str(len(results)) + " quotes")
- for result in results[:3]:
- notice("quote #" + str(result[0] + 1) + ": "
- + result[1][:-1])
+ if to_skip >= len(results):
+ notice("skipped all quotes matching query")
+ else:
+ notice("found %s matches, showing max. 3, skipping %s"
+ %s (len(results), to_skip))
+ for i in range(len(results)):
+ if i >= to_skip and i < to_skip + 3:
+ result = results[i]
+ notice("quote #" + str(result[0] + 1) + ": "
+ + result[1][:-1])