samedi 5 mai 2018

python if or statement with " \ " character

I'm trying to understand a piece of code that blinks an LED at a varying rate depending on the state of variables. What does the '\' do in this IF statement?

if (lamp_flashing_counter2 == 2) or \
    (lamp_flashing_counter2 == 4) or \
    (lamp_flashing_counter2 == 6) or \
    (lamp_flashing_counter2 == 8):
    error = 1

prior to this statement lamp_flashing_counter2 is initialized at 0 and incremented by 1 every one second.

Aucun commentaire:

Enregistrer un commentaire