I'm not very experienced with coding in Python and have come across something that seems peculiar.
The following function is what I have in the Python Source Editor.
When I run the function in the Python Shell, it is showing the letter L is added to two numbers.
I inserted a print command just before they are inserted in the list to use as a check of the values before appending.
So it appears these Letters are getting inserted during the append operation.
I can only guess I am not using the append function properly?
def Create_Sequence():
Sequence = []
Previous = 0
Current = 1
for Count in range(100):
Next = Current
Current = Previous + Current
Previous = Next
Result = Current % 40
Contains = 0
for Count2 in range(len(Sequence)):
if(Sequence[Count2] == Result):
Contains = 1
if( Contains == 0 ):
print Result
Sequence.append(Result)
return Sequence