Can we declare using th keyword "global" in declaring a global array?
ie like global arr = []
This throws an error saying invalid syntax.
ie like global arr = []
This throws an error saying invalid syntax.
global th = [] th.append(thread)
for t in th
t.join()
global th = [] th.append(thread)
for t in th
t.join()
def firstcode():
...
th=[]
th.append(thread)
...
return th
def nextmethod(th):
for t in th:
t.join()
global th th=[]
def firstcode():
...
th=[]
th.append(thread)
...
return th
def nextmethod(th):
for t in th:
t.join()
global th th=[]
Comment