IndexError
Just run it and you'll see. I've no clue where's the bug and why so please help me!
c4syner
Could you explain what
elif "ans" in cmd: ansnum = 4 answer = list() for i in range(len(cmd)): print(i) answer.append(cmd[ansnum]) ansnum += 1 print(answer)
does?
If the goal of the elif block where your error is occurring is to put the variable
cmd
into a list of characters. Then setansnum = 0
rather thanansnum = 4