Ask coding questions

← Back to all posts
Pulling from a separate file
SaladHat (1)

I need to pull from a text file (which I've done) but I need it to randomly pick from a list of defined quotes which i cannot figure out.

Answered by malvoliothegood (871) [earned 5 cycles]
View Answer
malvoliothegood (871)

Your quotes need to be in a text file. Your program needs to read this file and turn its content into a list. A random item/quote can then be displayed from the list: