Need help in understanding this code

for date in HabitLog.objects.values_list('date',flat=True).distinct():
                print('Duplicate Deleted')

What is it about this code that you don’t understand?

Break it apart into parts (individual lines) and then individual function calls. Look at it step by step.

First line:

What does this line do?

Second line:

What does this line do?