Skip to content

Instantly share code, notes, and snippets.

@gallirohik
Created December 16, 2017 09:20
Show Gist options
  • Save gallirohik/45a63b31d62494dd58a765ef5b5729ff to your computer and use it in GitHub Desktop.
Save gallirohik/45a63b31d62494dd58a765ef5b5729ff to your computer and use it in GitHub Desktop.
get number of students in yearwise
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