You are viewing a single comment's thread from:

RE: Steem-Python Beginner Series : Competition Script - Picking a Random Winner

in #steemdev8 years ago

I tried your code and it is working fine although I was having an error for a while until I figure it out, that I only posted one short introduction post, that of course no one re-blogged, so my list of potential winners was empty and that's why program crashed.

Maybe a quick check if list of potential winners is not empty before running random may be a slight improvement :-)

Sort:  

Ah thanks for pointing that out @veleje . I updated it and added some validation before picking a winner :)