First time here? Check out the FAQ!
answered 6 years ago
When you type 9 in Sage, the preparser makes it a Sage integer, that have a .digit method. The range function returns Python ints, who do not have such a method. As you discovered, the srange function returns Sage integers.
9
.digit
range
srange