Following methods in the str class control the alignment of characters within the string object.
Sr.No. Methods & Description1
Returns a string padded with fillchar with the original string centered to a total of width columns.
2
Returns a space-padded string with the original string left-justified to a total of width columns.
3
Returns a space-padded string with the original string right-justified to a total of width columns.
4
Expands tabs in string to multiple spaces; defaults to 8 spaces per tab if tabsize not provided.
5
Returns original string leftpadded with zeros to a total of width characters; intended for numbers, zfill() retains any sign given (less one zero).
python_string_methods.htm
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4