Write a program that simulates a CLI application. Given a list of command strings, execute them in order and return the outputs produced by commands that print a result.
simulate_cli(commands)
commands: a list of command stringsSupported commands are pwd, cd <path>, set <key>=<value>, get <key>, write <path> <content>, cat <path>, and ls.
def simulate_cli(commands):