random.randrange(a, b)function, which returns a random number
nin the range
a <= n < b, and the
random.randint(a, b)function, which returns a number in the range
a <= n <= b, have been combined into a single function which takes one argument of type "range" (in 11l the range for
a <= n <= bis written as
a..b, while the range for
a <= n < bis written as
match()regular expression object method has been replaced by
fullmatch()(in other words,
fullmatch()in Python corresponds to
re.subfunctions have been moved from the
remodule into the overloaded string methods
gettempdir()function from the
tempfilemodule and some functions from the
rename, etc.) have been moved to a separate
fsmodule; the functions from the
os.pathhave been moved to
- 11l has two modules instead of the
maxheap, which has no direct equivalent in Python.
hexfunctions return a string without the
0xprefix, because the unprefixed string is more often what is wanted (1, 2, 3, 4, 5, 6, 7, 8, 9).
"\n".join(arr)in Python corresponds to
arr.join("\n")in 11l (and in 11l the elements of
arrcan be not just strings, as in Python, but any objects for which conversion into a string is defined).
map(lambda x: x * 2, filter(lambda x: x % 2 == 0, [1, 2, 3, 4]))in Python corresponds to
[1, 2, 3, 4].filter(x -> x % 2 == 0).map(x -> x * 2)in 11l.