mirror of
https://github.com/erg-lang/erg.git
synced 2025-12-23 05:36:48 +00:00
15 lines
232 B
Python
15 lines
232 B
Python
arr = [[1, 2], [3, 4]]
|
|
x = arr[0][0]
|
|
print! x
|
|
|
|
dic = {"a": {"a": 1}, "b": {"b": 2}}
|
|
y = dic["a"]["a"]
|
|
print! y
|
|
|
|
ab = if True: # x: {"a"} or {"b"}
|
|
do "a"
|
|
do "b"
|
|
_ = ["c", "d", ab] # OK
|
|
|
|
d2 = [{"a": 1}]
|
|
assert d2[0]["a"] == 1
|