When I run this, i get that an error that states index 0 is out of range. This is confusing, as my input values definitely has a value at index 0, so I am not sure why the code is stuck.
Any help is appreciated, I am able to get this python script to work without looping.
Thanks Sal, a few questions that I think is inherently different in the python than from what I am used to with my programming background (I’ve only used matlab before for coding).
How does python know how long to iterate a “for” loop for in your example above? All that is mentioned is a variable? Does python somehow know the length of the variable?
In the output (lineloads in the example) we give no indices to the solution, how does the answer know where to be saved in the loop without an index? I am guessing this has something to do with the append function?
also interesting, it appears as though the looping value (point in the example) pulls the actual value in a list, without the need to reference an index.
I am going to do a little more general research on python, as this still feels quite foreign to me at this point.