How to make the module randome to chose between inputs? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to make the module randome to chose between inputs?

28th Oct 2018, 2:51 PM
Alexis Durand
Alexis Durand - avatar
2 Answers
0
import random a = input('first input: ') b = input('second input: ') choice = random.choice([a, b])
28th Oct 2018, 3:37 PM
Ulisses Cruz
Ulisses Cruz - avatar
0
Thanks
28th Oct 2018, 3:40 PM
Alexis Durand
Alexis Durand - avatar