I was not sure whether to post this to stackoverflow or programmers, so sorry if I chose the wrong one. I am also very new to python, so there might be something missing for me.
Which one is more correct. As in, which one is best practice. Both? If so, which one do I use when.
1) Lambda:
def hello_world(): server_thread = threading.Thread(target=lambda: print("Hello World"))
2) Function inside function
def hello_world(): def hello(): print("Hello World") server_thread = threading.Thread(target=hello)
sinΞΈ source share