so there is this very simple code:
keywords = open('a.txt','r').read().splitlines()
for i in keywords:
print(i)
and what it does, is prints out every single line from the txt file
so lets say in that txt file there is a list:
dog
eat
sleep
and this code will basically print out every single line from that txt file, but the thing is, I want to modify the code so that the program would be able to also tell which line is also being currently printed out, so like the output would look like this:
dog 1
eat 2
sleep 3
How can I do that?