Write a function that receives two strings as parameter. This strings are in the following format of date: `YYYY/MM/DD`.
Your job is: Take the `years` and calculate the difference between them.

Examples:
```
'1997/10/10' and '2015/10/10' -> 2015 - 1997 = returns 18 
'2015/10/10' and '1997/10/10' -> 2015 - 1997 = returns 18
```
At this level, you don't need validate months and days to calculate the difference.

Source: codewars | Difficulty: EASY
Tags: String algorithms

Fundamentals

Starter code: def how_many_years (date1,date2):
	

Solutions:
def how_many_years(date1, date2):
	return abs(int(date1.split('/')[0]) - int(date2.split('/')[0]))


def how_many_years(date1, date2):
	return abs(int(date1[:4]) - int(date2[:4]))


def how_many_years(date1, date2):
	year = lambda d: int(d[:4])
	return abs(year(date1) - year(date2))


def how_many_years(date1, date2):
	get_year = lambda date: int(date.split('/')[0])
	return abs(get_year(date1) - get_year(date2))


how_many_years = lambda d1, d2: abs(int(''.join(d1[:4])) - int(''.join(d2[:4])))


def how_many_years(*dates):
	years = [int(date.split('/')[0]) for date in dates]
	return abs(years[0] - years[1])


from datetime import datetime

def how_many_years(*dates):
	(d1, d2) = [datetime.strptime(s, '%Y/%m/%d') for s in dates]
	return abs(d2.year - d1.year)


HowManyYears = how_many_years = lambda *a: abs(int.__sub__(*(int(d.split('/')[0]) for d in a)))


def how_many_years(date1, date2):
	(a, b) = map(int, map(lambda x: x.split('/')[0], (date1, date2)))
	return abs(b - a)


def how_many_years(d1, d2):
	a = d1[0:4]
	b = d2[0:4]
	print((int(a), int(b)))
	return abs(int(a) - int(b))