Scroll Down to See All▾
absaiterallanextanyasciibinboolbreakpointbytearraybytescallablechrclassmethodcompilecomplexdelattrdictdivmodenumerateevalexecfilterfloatformatfrozensetgetattrglobalshasattrhashhelphexidinputintisinstanceissubclassiterlenlistlocalsmapmaxmemoryviewminnextobjectoctopenordpowprintpropertyrangereprreversedroundsetsetattrslicesortedstaticmethodstrsumsupertupletypevarszip__import__clear_(dict)clear_(list)clear_(set)copy_(dict)copy_(list)copy_(set)fromkeysgetitemskeyspop_(dict)pop_(list)pop_(set)popitemsetdefaultupdatevaluescount_(tuple)count_(list)count_(str)index_(tuple)index_(list)index_(str)adddifferencedifference_updatediscardintersectionintersection_updateisdisjointissubsetissupersetremove_(set)remove_(list)symmetric_differencesymmetric_difference_updateunionupdateclosefilenoflushisattyreadreadablereadlinereadlinesseekseekabletelltruncatewritablewritewritelinesappendextendinsertreversesortcapitalizecasefoldcenterencodeendswithexpandtabsfindformatisalnumisalphaisasciiisdecimalisdigitisidentifierislowerisnumericisprintableisspaceistitleisupperjoinljustlowerlstripmaketranspartitionreplacerfindrindexrpartitionrsplitrstripsplitsplitlinesstartswithstripswapcasetitletranslateupperdirzfillFunction Details: rjust
Description
Returns right-justified string of length width.
Extended Description
The rjust() method returns a right-justified version of the string. It pads the string on the left with the specified fillchar (space by default) so that the resulting string has the specified width. If the input string is already longer than the specified width, it returns the original string unchanged.
Exceptions
- TypeError: If width is not an integer or fillchar is not a single character string
Read More about rjust from Python Documentation
Function Signature
Module: builtins
Class: str
Parameters
Parameter List
- width: int
- fillchar: str
Return
Returns a new string of the specified width with the original string right-justified and padded on the left with the fillchar.
Return Type
str
Output
Explanation
Basic usage of rjust() to right-justify 'Python' in a field of width 10.