Build a User Configuration Manager - Build a User Configuration Manager

Tell us what’s happening:

For the view_setting
The result is coming but just the format is not correct

Your code so far

test_settings = {
    'theme': 'dark',
    'notifications': 'enabled',
    'volume': 'high'
}
def add_setting(settings, datas):
    key, value = datas
    key = key.lower()
    value = value.lower()
    if key in settings:
        return f"Setting '{key}' already exists! Cannot add a new setting with this name."
    settings[key] = value
    return f"Setting '{key}' added with value '{value}' successfully!"

def update_setting(settings, datas):
    key, value = datas
    key = key.lower()
    value = value.lower()
    if key in settings:
        settings[key] = value
        return f"Setting '{key}' updated to '{value}' successfully!"
    return f"Setting '{key}' does not exist! Cannot update a non-existing setting."

def delete_setting(settings, single_data):
    key = single_data
    key = key.lower()
    if key in settings:
        del settings[key]
        return f"Setting '{key}' deleted successfully!"
    return f"Setting not found!"
    
def view_settings(all_datas):
    if all_datas == {}:
        return "No settings available."
    output = "Current User Settings:"
    for key, value in all_datas.items():
        output = output + "\n" + key + ":" + value + "\n"
    return output

print(view_settings({'theme': 'dark', 'notifications': 'enabled', 'volume': 'high'}))    

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36

Challenge Information:

Build a User Configuration Manager - Build a User Configuration Manager

GitHub Link: https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/lab-user-configuration-manager/684aaf9ec670c68d20efd0d0.md

Hey @Biswas_Rai_Coder

The problem is in your for loop. You’re adding two newlines b/w every item. Your output should match the following output shown in image (Also provided in user story 8)

I see. I need it outside the loop. :laughing: