Computer Science, asked by rghvd4372, 1 year ago

What are the two parameters of center( ) method.

Answers

Answered by Loveprincess19
0

Answer:

two methods are there

•width

• fillchar

Explanation:

mark me as a brainlist pls

Attachments:
Answered by letmeanswer12
0

Parameters of center( ) method

Explanation:

Python center() method aligns string with the center by filling the string paddings left and right. This method requires two parameters, first width and second an optional fillchar. The fillchar is a character that is used to fill the string's padding left and right.

  • Syntax - str.center(width[, fillchar])
  • Parameters  - (width) − This specifies the total width of the string.  (fillchar) − This is the filler character.
  • Return Value - This string method returns a string of length width with centered.

Similar questions