how to select random line from txt file in python code example
Example: get random line from file python
import random
lines = open('file.txt').read().splitlines() # creates a list with one line per iteù
randomLine =random.choice(lines) # pick up a random item in this list