Try using an array. led_pin = [23, 24, 25, 17, 27] Reference each element with for i in range(0,5): GPIO.output(led_pin[i],True) sleep(1) GPIO.output(led_pin[i],False) I hate to change some of Dougie's code as I'm sure he knows far more than I do about programming, however this bit of code is, to m...