Can you explain the design patterns you have worked on?
Asked in the Technical stage. Logged as the Technical question of a Citi Solutions Architect interview on 13 Jan 2021.
To demonstrate your answer in code, implement a configurable formatter using the Strategy and Factory patterns. Given a list of messages and a formatter name, return the formatted messages.
format_messages(messages, formatter) returns a list of strings. Supported formatters are plain, upper, and bracket.
def format_messages(messages, formatter):