You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
259 B
14 lines
259 B
print(dict([(1, "foo")]))
|
|
d = dict([("foo", "foo2"), ("bar", "baz")])
|
|
print(sorted(d.keys()))
|
|
print(sorted(d.values()))
|
|
|
|
try:
|
|
dict(((1,),))
|
|
except ValueError:
|
|
print("ValueError")
|
|
|
|
try:
|
|
dict(((1, 2, 3),))
|
|
except ValueError:
|
|
print("ValueError")
|
|
|