mylist
is an instance of the class (or type)list
pop
is a method ofmylist
3
is a member ofmylist
or3
is contained inmylist
3
is the argument to the methodpop
Python terminology - class / method / object
-
28-06-2022 - |
题
I'm new to Python. Just trying to get my head around some terminology. Take the following example:
mylist = [1, 2, 3]
mylist.pop(3)
Are the following statements correct:
- mylist is an object of the class list
- pop is a method of mylist
- 3 is a variable of the list mylist
- 3 is a variable of the method pop
解决方案
不隶属于 StackOverflow