How to make list thread safe?

To access a list of need to do this using the lock object?
How to make this example thread safe? Where might there be conflicts?
valid_proxy = None
 while not valid_proxy:
 random_item = random.randrange(0,len(config.PROXY))
 random_proxy = config.PROXY[random_item]
 if not is_bad_proxy(proxy_type,proxy):
 valid_proxy = random_proxy
break
else:
 del(config.PROXY[random_proxy])
July 8th 19 at 16:44
1 answer
July 8th 19 at 16:46
No, read about GIL.

Find more questions by tags Python