I have got this code so far.
You input a number and it should read the specific line in the packages.txt file and print it into the python shell.In the code below, if you enter “3” in for example it will print line 1-3 which i do not want it to do.
which = input('Which package would you like?: ')
with open('packages.txt') as f:
i = 0
for line in f:
if i == (int(which)):
break
i += 1
print (line)
Think about the flow of the code and when
print (line)is being called.Can you see the 2 very important differences between this code and yours?