Skip to content

Plonkathon 项目中 program.py 的 get_public_assignments 函数问题 #76

Discussion options

You must be logged in to vote

明白 python 的这个语法了,如果这样写

a = 3
b = {a: 3, "c": 2}
print(b)

输出:

{3: 3, 'c': 2}

var_name 会被替换成实际的值

加上双引号才表示是个 string,直接作为 object 的 key、

!= 是两个 object 的 copy value 对比是否相等

Replies: 1 comment

Comment options

luckyyang
Apr 26, 2023
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by luckyyang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant