Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
choose a random snippet of text
DidoCarthage
Programming language:
Python
2021-06-26 11:47:58
0
Q:
choose a random snippet of text
Step Aside
Code:
Python
2021-07-05 01:40:14
import random line = random.choice(open('data.txt').readlines())
0
Tags
text
random
Related
generate random characters in python
remove random character from a dictionary python
python get random character from string
generate random word python
how can i remove random symbols in a dataframe in Pandas
choice random word in python from a text file
how to make a module that generates a random letter in python
New to Communities?
Join the community