center(): Adding chars to both side of the string.
Output is here ( there are blank spaces at both sides of the string. Total length of the output string is equal to 30)
length: required , the length of the string after adding filling_char at both sides.
filling_char : (optional), default is blank space, used at both sides of the string.
All String methods
Subscribe to our YouTube Channel here
This article is written by plus2net.com team.