Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

How does Python pass arguments to functions?

  1. A Always by value
  2. B Always by reference
  3. C By object reference: mutations are visible to the caller but rebinding is not
  4. D By pointer arithmetic
Answer

By object reference: mutations are visible to the caller but rebinding is not

Appending to a passed list affects the caller. Reassigning the parameter to a new list only changes the local name.

All Python MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as