문제

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
도움이 되었습니까?

해결책

  • mylist is an instance of the class (or type) list

  • pop is a method of mylist

  • 3 is a member of mylist or 3 is contained in mylist

  • 3 is the argument to the method pop

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top