User configuration manager, test 27

Don’t know why eventhough I get the same output as the one required, the test 27 dont’ pass. Can you please give me a hint to solve it?

def view_settings(param_d):
if not param_d:

    return f"No settings available."

elif param_d:

    display = f"Current User Settings:"

    for k, v in param_d.items():

        display += f"\\n{k.title() if isinstance(k, str) else k }: {param_d\[k\].lower()if isinstance(param_d\[k\], str) else param_d\[k\]}"

    return display+'\\n'


test_settings = {‘theme’: ‘dark’, ‘notifications’: ‘enabled’, ‘volume’: ‘high’}

print(view_settings(test_settings))

Please post a link to the challenge

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Get Help > Ask for Help button located on the challenge.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

I’ve edited your post to improve the readability of the code. When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add the backticks.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Thank you for the information.

Please post a link to the challenge