Python 3 - Using randint without some values -


how can hold values while using choice

>>> x ['ace', 'king', 'queen', 'jack', 10, 9]  >>> choice(x),choice(x),choice(x),choice(x),choice(x) (10, 'jack', 9, 'king', 10) 

now need ask user hold values. if chooses jack ex. need keep jack aside , chose 4 values x. -

('jack',10, 9, 'queen', 'ace')  

also, can same randint?

import random  foo = ['a', 'b', 'c', 'd', 'e'] print(random.choice(foo)) 

example :: how randomly select item list?

hopefully need (+code maintain list contents)


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -