Download 'intervalmap' from this recipe page.
1 2 >>> i = intervalmap() 3 >>> i[0:5] = '0-5' 4 >>> i[8:12] = '8-12' 5 >>> print i[2] 6 0-5 7 >>> print i[10] 8 8-12 9 >>>
12945 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
1 2 >>> i = intervalmap() 3 >>> i[0:5] = '0-5' 4 >>> i[8:12] = '8-12' 5 >>> print i[2] 6 0-5 7 >>> print i[10] 8 8-12 9 >>>
You need to create an account or log in to post comments to this site.