Python Question / Quiz; What is the output of the following Python code, and why? 🤔🚀 Comment your answers below! 👇 #python #programming #developer #programmer #coding #coder #webdeveloper #webdevelopment #pythonprogramming #pythonquiz #machinelearning
10
5
72
5K
16
Download Image
@Python_Dv The center() method will: - Take the original string ('PYTHON' - 6 characters) - Center it within a field of width 8 - Fill the extra spaces (1 on each side) with '#' characters Therefore, the output will be: '#PYTHON#' The correct answer is A. #PYTHON#
@Python_Dv It keeps the string center and fill in # both in right and left