def f(st): st.append('x') return stst=['a']st=f(st)print(st)结果是
A: ['a','x']
B: ['a']
C: ['x']
D: ['x','a']
A: ['a','x']
B: ['a']
C: ['x']
D: ['x','a']
举一反三
- def f(st): st.append('x') return st st=['a'] st=f(st) print(st) 结果是
- 要把st变成st=['x','a','b'],那么操作是st=['a','b']_____print(st) A: st.append('x') B: st.insert(1,'x') C: st.insert('x') D: st.insert(0,'x')
- def f(): st["name"]="x" st={"name":"a","sex":"male"} f() print(st["name"],st["sex"]) 结果是
- def f():st["name"]="x"st={"name":"a","sex":"male"}f()print(st["name"],st["sex"])结果是 A: male B: a male C: x None D: x male
- def f(): st["name"]="x"st={"name":"a","sex":"male"}f()print(st["name"],st["sex"])结果是 A: 错误 B: a male C: x male D: x None