Hey Kundan, you can use the return keyword in order to get the result of a JavaScript code as shown in the example below:
from selenium import webdriver
from time import sleep
driver = webdriver.Firefox()
driver.get("https://www.example.com")
driver.execute_script("document.getElementsByClassName('login-btn')[0].click()")
result = driver.execute_script("return 0")
print(result)
sleep(10)
driver.close()