Discussion :: Python MCQs
-
What is the output of the following?print('*', "abcdef".center(7), '*')
Answer : Option A
Explanation :
Padding is done towards the left-hand-side first when the final string is of odd length. Extra spaces are present since we haven't overridden the value of sep.
Be The First To Comment