You are viewing a single comment's thread from:
RE: Steem-Python Beginner Series : Competition Script - Picking a Random Winner
Hey thanks for the reply and yes, I'll be doing more of these in the future so stay tuned!
Hey thanks for the reply and yes, I'll be doing more of these in the future so stay tuned!
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 :-)
Ah thanks for pointing that out @veleje . I updated it and added some validation before picking a winner :)