Ask Your Question

Revision history [back]

Integer not iterable

Not sure if this was asked before. I've been going through the Sage and Python tutorials for the past 3 weeks as I worked out that I'll eventually have to learn at least some Python so to get what I need from Sage. So far so good,

But this one escapes me. The Sage tutorial refers to this example in The Python library:

map(mul, [0, 1, 2, 3], [10, 20, 30, 40]) which is supposed to yield [0, 20, 60, 120]

However, I keep getting ... ... TypeError: 'sage.rings.integer.Integer' object is not iterable

What's causing this?

Hope someone can help Gerry