Demo entry 6341354

test

   

Submitted by anonymous on Dec 31, 2016 at 01:19
Language: Python console session. Code size: 187 Bytes.

>>> sl = sortedcontainers.SortedList(range(int(1e7)))
>>> 1234567 in sl
True
>>> sl[7654321]
7654321
>>> sl.add(1234567)
>>> sl.count(1234567)
2
>>> sl *= 3
>>> len(sl)
30000003

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).