Project Euler #3 with Python
timing

Put the code to time the run time of the function outside of the function

augmented assignment

value = (value // i) can be expressed as value //= i

divisors

Why do you need to keep a list of divisors. They only as for the largest one. The largest one will always be the last one, so you just need to remember this

pep-8


your variable names are clear and in the correct format, apart from i. I would rename that to divisor or prime
The spacing around the operators and ( is inconsistent
the if i &gt;= 3: i += 2 on one line is advised against


increments

    if i &gt;= 3: i += 2 #when i is bigger than 3, search divisors among odd numbers( this reduces the search field)
    else: i += 1  


can be simplified to i += (2 if i &gt;= 3 else 1) or even i += 1 + (i &gt;= 3), using the fact that int(True) is 1. But here you don't use the fact that your divisors are all primes. A quicker process would be to get the next possible divisor from a prime generator, instead of incrementing by 2 manually

while loop

You can integrate the if i == 1 : break into the condition for the while loop: while value % prime == 0 and value != 1:



def largest_prime_divisor(value):
    largest_divisor = 1
    for prime in prime_generator():
        while value % prime == 0 and value != 1:
            value //= prime 
            largest_divisor = prime 
    return largest_divisor


Possible implementations of prime_generator can be found in dozens of SO and Code review posts

shortcut

If the divisor is larger than the square root of the value, you know the next divisor will be the value itself, so you can shortcut when the divisor exceeds this

def largest_prime_divisor(value):
    largest_divisor = 1
    for prime in prime_generator():
        while value % prime == 0:
            value //= prime 
            largest_divisor = prime 
        if prime ** 2 &gt; value:
            return max(largest_divisor, value)
    return largest_divisor