A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://svn.python.org/projects/python/branches/r22b2-branch/Tools/scripts/suff.py below:

#! /usr/bin/env python # suff # # show different suffixes amongst arguments import sys def main(): files = sys.argv[1:] suffixes = {} for file in files: suff = getsuffix(file) if not suffixes.has_key(suff): suffixes[suff] = [] suffixes[suff].append(file) keys = suffixes.keys() keys.sort() for suff in keys: print `suff`, len(suffixes[suff]) def getsuffix(file): suff = '' for i in range(len(file)): if file[i] == '.': suff = file[i:] return suff main()

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4