There is a Java implementation of TreeMap, which contains a method called tailMap as described here: https://docs.oracle.com/javase/7/docs/api/java/util/TreeMap.html
Is there a corresponding built-in library or third-party library for Python?
As far as I know, this python library implements tree map, but does not implement tailMap -- https://pypi.org/project/sortedcontainers