Hello,
I’ve been trying to learn Python concerning this problem:
 x is a list of floats that need to be changed through a function in multiple loops
 x[i] need to be larger than y (which increases by y each time the full list x has looped). So if x[i] > y: or if x > y:
 x[i] is changed to x[i] = i + ln2*Pi whereas i is the float value of x[i], l is the float value of l[i] (another list that is also given, and n is a constant that is given
 y is increased and the loop starts again with updated list x
 loop restarts until no items in x left that are > y
 the final list will have updated values that will be processed further in Grasshopper.
Summary of all inputs:
x: list of floats
y: constant 0.25 (based on a slider) that increases after each full loop
n: constant 10 (based on a slider), stays the same throughout
l: list of floats (same list length as x)
I’ve been having issues with not being able to process the two lists x and l through the same loop while they also have floats. None of the following have worked for me:

Does not change the values of the original list and may require a new list each loop?
result =
for i, j in zip(x, l):
if i > y:
i = i + jn2*Pi
result.append(i)
else:
result.append(i)
result = x 
Neither have worked because of float error message (Runtime error (TypeErrorException): can’t multiply sequence by nonint of type ‘float’). Enumerate also did not help me because I could not use x[i] to replace original values in list x anymore.
#for i in range(len(x)):
#for i, j in zip(range(len(x)), range(len(l))):
for i, j in zip(x, l):
if x[i] > y:
x[i] = i + ln2*Pi
print(x)
I’m taking my first steps in Python and have researched this for a while. While I think I understand what logically must happen, I have not been able to put this together in Python yet and would be thrilled to learn from your examples. Thanks for taking a look!
Best,
Martin