ใช้ rjust(width[, fillchar]) default fillchar คือ space
ตัวอย่าง
>> '15'.rjust(10) ' 15' >>> 'Yes'.rjust(2) 'Yes' >>> 'raj'.rjust(12) ' raj'
ถ้า width น้อยกว่าความยาวสตริง จะคืนสตริงเดิม
ใช้ rjust(width[, fillchar]) default fillchar คือ space
>> '15'.rjust(10) ' 15' >>> 'Yes'.rjust(2) 'Yes' >>> 'raj'.rjust(12) ' raj'
ถ้า width น้อยกว่าความยาวสตริง จะคืนสตริงเดิม