Hello I'm new to python and want to make a the for loop more concise using the list comprehension method these are the below. What is a way that I can do that?
if isinstance(value, list):
    new_value_list = []
    for item in value:
        replaced_text = substitute_jirae_text(item)
        new_value_list.append(replaced_text)
     section_dict[key] = new_value_list
else: 
 
     
     
     
    