Put random generated string into a list

+1 vote
asked Apr 23 by QuiiKy _ (420 points)
So I have a

Example = 'hi',''hello,''no"


and want to put that choice into a list:

inventory = ["hi"]

1 Answer

+1 vote
answered Apr 26 by MK (240 points)

There you go:

import random

Example = ["hi","hello","no"]
Inventory = []


Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.