выводит в случайном порядке пару ключ: значение
Но у меня, почему то
import random
#создаю словарь
some_dict = {'a':1, 'b':2, 'c':3, 'd':4, 'e':5, 'f':6}
#выбираю какие-нибудь случайные значения c помощью метода popitem()
#который выбирает из словаря пару 'ключ':значение в случайном порядке
print some_dict.popitem()
print some_dict.popitem()
****************************************************************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface. This connection is not visible on any external
interface and no data is sent to or received from the Internet.
****************************************************************
IDLE 1.1.4 ==== No Subprocess ====
>>>
('a', 1)
('c', 3)
>>>
('a', 1)
('c', 3)
>>>
('a', 1)
('c', 3)
>>>
('a', 1)
('c', 3)
>>>
('a', 1)
('c', 3)
>>>
('a', 1)
('c', 3)
>>>
('a', 1)
('c', 3)
>>>
('a', 1)
('c', 3)
>>>
('a', 1)
('c', 3)
>>>
('a', 1)
('c', 3)
>>>