answered 1 year ago
Your code works for me with SageMath 10.1 (the latest stable version).
Which version of SageMath are you using?