Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Here's a Generator Method that will return exponents of 2.

Code Block
borderStylesolid
titleGenerator Method Example
borderStylesolid
def TestGenerator():
    i = 1
    yield i
    for x in range(10):
        i *= 2
        yield i

print List(TestGenerator())
No Format
bgColor#D8DDE9
titleOutput
borderStylesolid
titleOutput
[1, 2, 4, 8, 16, 32, 64, 128, 512, 1024]

...