def sendMessages(message,towho): if(towho==1): comms.sendMsg(message) elif(towho==2 and isBluetoothConnected): sendBluetoothSocket(message) elif(towho==3): comms.sendMsg(message) if(isBluetoothConnected): sendBluetoothSocket(message)