How do I print a random string from a list that I made?This is in python, btw
Hi everyone, just started learning python, and I don't really know what to say here, except I need help with using random.choice without pink and red screaming at me from the console or whatever!! Haha
ok, lemme try.thx
You have to use
( to call a function.
[ is used for indexing parts of an array, and
random.choice is obviously not an array, it's a function!
import random german = 'deutsch' english = 'english' a = '1' b = '2' # some list print(random.choice([german, english, a, b])) # how I think I need to do it
Also don't forget to import the random module, it's not there by default.