PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

Python · Theory

Python List Methods

← All stacks

Theory

31/268

Python List Methods

Most list methods change the same list. append(x) adds one item at the end. extend(iterable) adds many. insert(i, x) puts x at index i. remove(value) deletes the first match. pop() takes the last (or pop(i) that index). clear() empties the list. sort() and reverse() edit in place.

append vs extend is the viva. names.append(["Neha"]) nests a list. names.extend(["Neha"]) adds the string Neha. sorted(names) returns a new list; names.sort() changes names. count(x) and index(x) only read. copy() is a shallow copy.

Python List Methods — output — [70, 80, 90] then 90. sort is in place. pop removes last.

Diagram
index →  0       1       2
  list  → [Asha,  Ravi,  Neha]
Exam tip

append([1,2]) vs extend([1,2]).

Example

# List methods
marks = [70, 90, 80]
marks.sort()
print(marks)
print(marks.pop())

Python List Methods — output: [70, 80, 90] then 90. sort is in place. pop removes last.

Short notes

  • DefMost methods change the list.
  • Diffappend vs extend.
  • Trapsort vs sorted.

Questions

1

Explain List Methods as if you are teaching a junior — definition, then one tiny script.

2

What does the example print, and why?

3

What mistake do freshers make with List Methods?

Previous← Python ListsNextPython Tuples →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.