#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http

제목객체에 "." 연산자후 method를 호출하면,2019-04-07 09:06
작성자 Level 10

return 값으로 method의 연산자를 주기 보단, 대부분 객체 자체의 값을 바꿉니다.

따라서, arrangeList.reverse()를 하면 arrangeList 자체가 역순으로 되어 있습니다.

reverse() method에 대한 python.org 설명을 참조하세요.


"The reverse() method modifies the sequence in place for economy of space when reversing a large sequence. To remind users that it operates by side effect, it does not return the reversed sequence." 

댓글