Hi im currently trying to study python and what i have at the minute im trying to regex one site then depending on the results send through different def's to get end results. Ill show a rough example underneath. Ive looked at threading but not 100% if its what i want or how to implement it, what i am trying to do is speed up the process as can take a while to compile my list at the end. Heres a rough example
def main regex():
match = etc
for result in match:
If 'a' in result:
A(result)
elif 'b' in result:
B(result)
elif 'c' in result:
C(result)
And so on....
def A(result):
Match = etc
for result in Match:
print result
def B(result):
Match = etc
for result in Match:
print result
def C(result):
Match = etc
for result in Match:
print result
And so on so at the end it compiles a list of 'results' However am finding it takes a fair bit of time and wondered if there was a way to speed up the process. Many thanks in advance.
P.s. this isnt the exact code just a rough example of what im trying to achieve