如何在python中将数字格式化为特定宽度?

Kar*_*ara -1 python

你会如何格式化?

for i in range(11):
    print(i)
Run Code Online (Sandbox Code Playgroud)

所以它看起来像:

 0
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Run Code Online (Sandbox Code Playgroud)

代替:

0
1
2
3
4
5
6
7
8
9
10
Run Code Online (Sandbox Code Playgroud)

我希望将所有单个数字推入2个空格,而不是1个