The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #921
print(f'.{"Python".center(10, "_")}.')
The center() method centers and aligns a string, using a specified character (space is default) as the fill character. (w3schools.com/python/ref_string_center.asp)
What is the output of the code snippet below?
— The Python Quiz (@thepythonquiz) April 21, 2021
print(f'.{"Python".center(10, "_")}.')
.__Python__.
It will throw a AttributeError error.
Python_._Python
_Pyt.hon_
._Python_.
π Comment the answer, like and retweet! #python
Question difficulty: π΅π΅π΅π΅π΅