Jun-07-2018, 12:19 AM
Thank you @buran for your concise and to the point answer. And a thousand thank-you’s go out to @wavic: I wholeheartedly appreciate the time and care you put into your answer to my question. Feedback from the both of you has helped.
I think I am beginning to understand some of this.
To invoke the
Next I’ll look into the concept of iterators in Python.
As @wavic pointed out, to learn about what certain class methods can be used to manipulate objects and for quick reference, I can leverage dir(), type() and help() around given objects in my interpreter, right?
Obviously there are docs on Python’s official website and resources around the web also.
Thanks again you two.
I think I am beginning to understand some of this.
reverse()
is a class method used to manipulate class objects such as lists. To reverse the order of a list, the variable goes “outside” (before the method separated by a dot).To invoke the
reversed()
function to manipulate a declared list variable and to create the same effect, the variable goes "inside" as an argument. But to do so successfully, it’s necessary to wrap it around a list()
function.Next I’ll look into the concept of iterators in Python.
(Jun-02-2018, 05:40 AM)buran Wrote: Now to the question - you will know what to do by reading the documentation for the package/module you want to use - e.g. does it provide function(s) or is it a class(es) and has some methods...
As @wavic pointed out, to learn about what certain class methods can be used to manipulate objects and for quick reference, I can leverage dir(), type() and help() around given objects in my interpreter, right?
Obviously there are docs on Python’s official website and resources around the web also.
Thanks again you two.