Created
December 16, 2017 09:20
-
-
Save gallirohik/45a63b31d62494dd58a765ef5b5729ff to your computer and use it in GitHub Desktop.
get number of students in yearwise
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
def getYear(srkrData): | |
years={} | |
for s in srkrData: | |
year=s.split("\t")[2]; | |
if(years.has_key(year)==True): | |
yearCount=years[year] | |
yearCount=yearCount+1 | |
years[year]=yearCount; | |
else: | |
years[year]=1 | |
return years | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment