[EdLUG] Learning python

Andrew Smith asmith9983 at gmail.com
Sun Apr 11 17:40:50 UTC 2021


Guys
I solved it myself
1.  reverse()  method doesn't return a value, it just reverses the self
list in place.
2. The function reverse()  does not exist.
Andrew


On Sun, 11 Apr 2021 at 16:39, Andrew Smith <asmith9983 at gmail.com> wrote:

> Guys
> I have a Raspberry Pi and  after some thought, decided I should learn
> Python as it's the  language most used in projects around it,and also in
> data science.
> Knowing C++, and Haskell, I thought it would be simple. *Hello World*
> was no problem, but lists have been less so.
>
> I've attached my test code.  I Had to comment out lines 5 & 6 to get any
> output.
> Why  does  .reverse(0 not work as a list method on line 5, and then as a
> stand alone function on  line 7 ?
> Andrew
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.edlug.org.uk/pipermail/edlug/attachments/20210411/2a12053b/attachment-0001.html>


More information about the EdLUG mailing list