Saturday, 31 August 2013

Python loop efficiency

Python loop efficiency

I was just wondering if there is a more cpu efficient way of writing the
following loop as I need to speed my program up?
for char in data:
if char in self.key:
match += chr(self.key.index(char))
Thanks in advance for any help, Clinton.

No comments:

Post a Comment