function sendDataToPython(data) { fetch('[B]Link Removed[/B]', { method: 'POST', body: JSON.stringify({ text: data }), headers: { 'Content-Type': 'application/json' } }) .then(response => response.json()) .then(result => { // handle the result returned from Python console.log(result); }) .catch(error => { console.error('Error:', error); }); } // Call the function and pass your text data sendDataToPython('Your text data');