Python:
data = {'Одуванчик': 2007, 'Ягодка': 2011, 'Находка': 2022}
current_year = 2022
data = {group: data[group] for group in data if current_year - data[group] <= 5}
print(data)
Python:
data = {'Одуванчик': 2007, 'Ягодка': 2011, 'Находка': 2022}
current_year = 2022
data = {group: data[group] for group in data if current_year - data[group] <= 5}
print(data)