Re: [Dorset] Python Slicing Problem

2021-01-31 Thread Terry Coles
On Sunday, 31 January 2021 15:00:08 GMT Stephen Wolff wrote: > 3-5=-2, which might be what you meant (2 from the end of the list). But my > guess is that you mean [3:5]? Doh! And it was right in the Test.py program... Thanks. -- Terry Coles -- Next meeting: Online,

Re: [Dorset] Python Slicing Problem

2021-01-31 Thread Stephen Wolff
Hiya > The problem I have is that when I copy specific elements from the variable > called data it doesn't happen; the lines: > >Status[3-5] = data[3-5] >Status[7] = data[7] >Status[12] = data[12] 3-5=-2, which might be what you meant (2 from the end of the list). But my guess is

[Dorset] Python Slicing Problem

2021-01-31 Thread Terry Coles
Hi, This is driving me nuts! I have a fragment of code inside my Music Player Software which sends a message, using Hamish's sockets code, to the Bells Pi and retrieves the answer coming back. Ostensibly it's all working, but I'm struggling to copy the relevant data to a global Python List