For you who thought it was AD, here is the explanation:
When you have an array in a variable and set it to another variable, they share the same id, that means they point to the same array.
a = [1]
b = a
print(id(a), id(b)) # same id
Since a==b, when you set a[0] = 0, you are "also" doing b[0] = 0
This section is not available anymore. Please use the main Exam Page.PCAP Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ivanbicalho
Highly Voted 2 years, 1 month agorbishun
Highly Voted 2 years, 11 months agoAmirhoseinShojaei
Most Recent 2 weeks, 1 day ago_vt
2 months agoseaverick
1 year, 2 months agorodanielb
1 year, 8 months agoAmcal
2 years, 1 month agogreyhats13
2 years, 3 months agonaveenbv80
2 years, 4 months agoJO5H
2 years, 6 months agoJnanada
2 years, 8 months agobesha
2 years, 9 months agoBaldridge
2 years, 10 months ago666_m
2 years, 11 months agomacxsz
2 years, 11 months agoyuv322
2 years, 11 months ago