"joe at gmail.com" <doodle4 at gmail.com> writes: > What's the best way to deal with this in python? I can't tell what you're trying to do. If you want an array containing the numbers 0,1,...,n-1, just say buf = range(n)