python 的rjust函数

str.rjust(width[, fillchar])

返回字符串的长度宽度中右对齐的字符串。做了填充使用指定的fillchar (默认为一个空格)。返回原始字符串宽度是否小于或等于len(s)

2.4 版本中的更改:Fillchar参数的支持。

 

序列类型的切片操作:

 

s[i] ith item of s, origin 0  
s[i:j] slice of s from i to j  
s[i:j:k] slice of s from i to j with step k

 

原文地址:https://www.cnblogs.com/gaocan/p/5322926.html