I am fairly new to programming and I was wondering about some stuff within indexes. I am trying to make a program that will type out words(I've got this part of the code working) but whenever I run the code with the index in I get this error: list index out of range. I was wondering what this could mean.
thank you.
from pynput.keyboard import Key, Controller
keyboard = Controller()
x = 0
file = open("A:\\Development\\Languages\\Python\\Programs\\NEWTEXT.txt", "r" )
for line in file:
fields = line.split(";")
while x < 340:
song = fields[x]
keyboard.type(song)
x = x + 1
file.close()
exit()