>>> for i in range(4, 24, 2): print i 4 6 8 10 12 14 16 18 20 22
>>> start = 4 >>> numRecords = 10 >>> step = 2 >>> >>> upperbound = numRecords*step + start >>> print upperbound 24 >>> for i in range(start, upperbound, step): print i 4 6 8 10 12 14 16 18 20 22 >>> >>> # demonstrate changing the input params: >>> start = 200 >>> step = 40 >>> numRecords = 7 >>> # same code, different input values, based on new input params >>> upperbound = numRecords*step + start >>> for i in range(start, upperbound, step): print i 200 240 280 320 360 400 440 >>>
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.