return value to a variable python code example
Example 1: how to set the return value of a function in pytohn
def showPrompt(symbol :str, container :str) -> None:
while container.lower() != "exit":
container = str(input(symbol))
Example 2: how to store a return value in a variable in python
def myfunction():
value = "myvalue"
return value
var = myfunction()
print(var)
>>> "myvalue"