vendredi 12 juin 2015

Random text with numbered variables

I'm currently trying to pick a random text stored in a numbered variable like this

source1 = '''First text'''

source2 = '''Second text'''     
randomtext = source[randint(1,2)]
liste_source = randomtext.rstrip('\n\r').split(" ")

However, it returns me an error message saying that the source is not defined... I don't understand because the source1 and source2 are defined above...




Aucun commentaire:

Enregistrer un commentaire