in a text file 0.txt, i have a line " shortens his length outside off, xxxx presses across and defends it to the off-side ". I am storing that data to list.
file = io.open('./commentry/0.txt','r',encoding="utf8")
for i in file.readlines():
zeroComm.append(i)
Now i want to get that line from list and print it when and where required by passing variable to it. For example.
name = 'martian'
print(random.choice(zeroComm))
I need output like [name in place of xxxx] shortens his length outside off, martian presses across and defends it to the off-side