Re: Passing Variable to Function

2016-10-09 Thread alister
On Fri, 07 Oct 2016 19:06:54 +, John McKenzie wrote: > Brendan and Alister, thank you both for responding. > > I am very inexperienced with python, but not new to computers so on my > own I realized the strings vs number mistake. (I seem to work with and > learn about Python for a few weeks

Re: Passing Variable to Function

2016-10-07 Thread John McKenzie
Brendan and Alister, thank you both for responding. I am very inexperienced with python, but not new to computers so on my own I realized the strings vs number mistake. (I seem to work with and learn about Python for a few weeks at a time with 6 to 12 months in between. Need to change that a

Re: Passing Variable to Function

2016-10-05 Thread alister
On Wed, 05 Oct 2016 19:17:33 +, John McKenzie wrote: > Hello, all. > > I have a function that takes three arguments, arguments to express an > RGB > colour. The function controls an LED light strip (a Blinkytape). > > Sometimes I might need to be change what colour is sent to the > funct

Re: Passing Variable to Function

2016-10-05 Thread Brendan Abel
Define your colors as actual number variables instead of a string color = (255,0,0) color2 = (0,0,255) Then use argument expansion to pass them in as separate arguments to the function colorFunction(*color) Brendan On Wed, Oct 5, 2016 at 12:17 PM, John McKenzie wrote: > > Hello, all. > > I

Passing Variable to Function

2016-10-05 Thread John McKenzie
Hello, all. I have a function that takes three arguments, arguments to express an RGB colour. The function controls an LED light strip (a Blinkytape). Sometimes I might need to be change what colour is sent to the function, so I set a variable with the idea that I can change just the variab