You can add the lines into a set() which will change their order randomly.
filename=open("lines.txt",'r')
f=set(filename.readlines())
filename.close()
To find the 1st line:
print(next(iter(f)))
To find the 3rd line:
print(list(f)[2])
To list all the lines in the set:
for line in f:
print(line)