[code.view]

[top] / python / PyMOTW / pdb / pdb_jump.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2010 Doug Hellmann.  All rights reserved.
     #
     
     def f(n):
         result = []
         j = 0
         for i in range(n):
             j = i * n + j
             j += n
             result.append(j)
         return result
     
     if __name__ == '__main__':
         print f(5)
     
     
     

[top] / python / PyMOTW / pdb / pdb_jump.py

contact | logmethods.com