Could this work? /usr/bin/env python import os import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.IN) GPIO.setup(24, GPIO.IN) GPIO.setup(25, GPIO.IN) pin_list = ['GPIO.input(23)', 'GPIO.input(23)', 'GPIO.input(23)'] for item in pin_list: if item == false: os.system('mpg321 -g 95 a.mp3') Bo