Given a large string, finding the length of the first longest even length sub-string
Firstly, "sub-string" is different than "word". I think "word" is more appropriate in this situation. (A substring can contain non-alphabetical characters).

import sys


You never use this. Get rid of it.

list1 = sentence.split()


This assignment is not terribly necessary.

Your algorithm can be simplified considerably. I think this should be left as an exercise, but here are some things you shouldn't have to do in the new algorithm:


Don't make a copy of the list.
Have some sort of best variable and best_count integer that stores the longest even word found and the length of that word.
After looping through the sentnce, return best.


Using this algorithm you only hit each word once instead of going through the even words again as you do in your algorithm.

The PEP8 style guide states that Python functions use snake_case instead of camelCase so: longestEvenWord -&gt; longest_even_word.