# Program

###### How to Remove duplicate lists in tuples
``````def removeDupl(list1):

return list(set([i for i in list1]))

# Driver code
list1 = [(1, 2), (3, 4), (5, 6), (1, 2)]
print(removeDuplicates(list1)) ``````
###### Two friends having different DOB as 01.01.1987 and 12.12.2000. Find out no of days difference between their DOB.
``````# How to find number of days between two dates
dt1 = (01, 01, 1987)
dt2 = (12, 12, 2000)

d1, m1, y1 = dt1, dt1, dt1
d2, m2, y2 = dt2, dt2, dt2
days1tuple = [31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
days2tuple = [31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

ndays1tuple = (y1 - 1) * 365
ldays1tuple = ((y1 - 1) // 4) - ((y1 - 1) // 100) + ((y1 - 1) // 400)
tdays1tuple = ndays1tuple + ldays1tuple

if((y1 % 4 == 0 and y1 % 100 != 0) or (y1 % 400 == 0)):
days1tuple = 29
else:
days1tuple = 28

s1 = sum(days1tuple[0:m1 - 1])
tdays1tuple += s1

ndays2tuple = (y2 - 1) * 365

ldays2tuple = ((y2 -1) // 4) - ((y2 - 1) // 100) + ((y2 - 1) // 400)
tdays2tuple = ndays2tuple + ldays2tuple

if((y2 % 4 == 0 and y2 % 100 != 0) or (y2 % 400 == 0)):
days2tuple = 29
else:
days2tuple = 28

s2 = sum(days2tuple[0:m2 - 1])
tdays2tuple += s2

difference = tdays2tuple - tdays1tuple
print('Difference count in days = ', difference)

``````