The assignment variable of python2.7 function cannot get the result.

I just started to learn that python, has two functions, one is to get the value of cookie of the website, and the other is to send a get request. Why can"t I use this variable a? how can I use the value of a? direct print is valuable and I use multithreading on my send side. Ask for expert advice

.
def cookieurl
    XXXXXX
    return
        XXXXXX
        
def send
    while true:
        a = cookieurl
        send = requests.get("http://www.xxxx.com", cookies=a)
        print send.status_code

your format is wrong. The
1 function is followed by :
2 return directly followed by the return value without line breaks. return indicates that the function is terminated, and your code is equivalent to terminating without any return value.
3 all parentheses and so on in the code are in English

def cookie(url):
    XXXXXX
    return XXXXXX
        
def send():
    while true:
        a = cookie(url)
        send = requests.get('http://www.xxxx.com', cookies=a)
        print send.status_code
Menu