• example:

    i = 5.0//2

    list[i]

    throws an error because i is double and the list-index expects an integer.

    so for it to work the code needs to look like this:

    i = int(5.0//2)

    list[i]

    meanwhile this works:

    i=5

    i= ‘abcde’