Created
September 10, 2012 20:03
-
-
Save artofhuman/3693476 to your computer and use it in GitHub Desktop.
Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
years = [str(item.active_from.year) for item in news_list] | |
dates = list(enumerate(years, start=1)) | |
result_years = [key for key,group in itertools.groupby(dates, key=lambda x: x[1][:11])] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment