I have simple loop:
vegetable_list = [('potatoes', 'potatoes', 'potatoes'), ('carrot', 'carrot'), ('onion', 'onion'), ('beet')]
akg = 0
print('Random vegetable: \n')
while akg < 5:
vegetable_random = [(i[0]) for i in vegetable_list]
print(random.choice(vegetable_random))
akg = akg + 1
But when I run it - I got normal result for items in lists, which have more than 1 item, but for 'beet'
- I got just symbol, instead of full word:
$ ./ovoch.py
Random vegetable:
potatoes
carrot
onion
b
b
So - how can I get just words from list?