Hello forum

After using Dynamo for some time I want to learn to use Python, but so far with very little success. I hope you will be able to help me:

Problem:

I have a list of values for angles and some are above 360 degrees. If a value is above 360 i want to subtract 360 from that number

Example:

The list 10, 10 , 375, 35 should be turned into 10, 10, 15, 35

I tried to make a Python script for this but so far i havent been able to. My script so far looks like this:

import clr

clr.AddReference(‘ProtoGeometry’)

from Autodesk.DesignScript.Geometry import *

angles = IN

for i in range(0,len(angles)):

if angles[i]>360

realangles[i]=angles[i]-360

else

angles[i]

realangles[i]=angles[i]

OUT = realangles[]

Im well aware that I might be way off, but I hope I can get some help to get on the right track.