Python list getting error in first line

let arr = : {1,4,12,23,41}
arr = 9,3
set s = 0
let result = arr[0]+arr[1]
print(result)

That code you show is not Python code. Where did you get this code from?

I count at least four syntax errors.

You could try this instead:

arr = [9, 3]
result = arr[0] + arr[1]
print(result)
1 Like