Jun-17-2021, 07:45 PM
I have a dictionary and I need to select 3 items randomly (the key and value).
items = { 'HP Laptop Charger':125, 'Wireless Mouse': 75, 'Wireless Keyboard':55, 'GTA5':199, 'Office 365':299, 'Headphone':45, 'AV':89 } items_list3 = random.sample(items, k=3) print(items_list3)Thanks