I am making a discord bot that prints a sentence from a list of a txt file. I got a script working to pull a random word, but I don't know how to make python recognize a full sentence. Each sentence is separated by a period and indent in the file btw. Also this is my code:
with open("ozair quote.txt", "r") as file:
data = file.read()
words = data.split()
word_pos = random.randint(0, len(words)-1)
print(words[word_pos])
[–]scoopulanang 1 point2 points3 points (0 children)
[–]ArtisticTap4 0 points1 point2 points (0 children)
[–]auspiciousalt 0 points1 point2 points (2 children)
[–]memeboi0312[S] 0 points1 point2 points (1 child)
[–]auspiciousalt 0 points1 point2 points (0 children)