3 ms·
SyntaxError: keyword can't be an expression You want to pass a list of tuples: from collections import OrderedDict assert list(OrderedDict([('a', 1), ('b'
by deno 10y ago
SyntaxError: keyword can't be an expression
You want to pass a list of tuples:
from collections import OrderedDict
assert list(OrderedDict([('a', 1), ('b', 2)]).keys()) == ['a', 'b']