πŸ“Š Python
Q. Which method adds an element at the end of a list?
Code:
l = [1, 2, 3]
  • (A) l.add(4)
  • (B) l.append(4)
  • (C) l.insert(4)
  • (D) l.extend(4)
πŸ’¬ Discuss
βœ… Correct Answer: (B) l.append(4)

Explanation: `append()` adds an element at the end of the list.

Explanation by: Mr. Dubey
`append()` adds an element at the end of the list.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
54
Total Visits
πŸ“½οΈ
10 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
84%
Success Rate