random choice from dictionary

Abdur-Rahmaan Janhangeer arj.python at gmail.com
Sun Dec 23 04:04:15 EST 2018


random.choice(list(data)) is great. fine with arbitrary selection.

else, given data.keys(), how do i get the first key?

yours
-- 
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


More information about the Python-list mailing list