-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep track of words tweeted and choose random word at the end of the day #1
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. needs final touches.
elif word_count == no_of_words_per_day: | ||
print('\ntodays_words:',todays_words) | ||
question = list(random.choice(todays_words)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could by default make word
a list type, instead of a tuple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two elements of the tuple (tweet_id and answer) are always needed together so it makes sense to combine them in a tuple. Also, a list would be useful in cases where there is a possibility of adding more elements. That isn't the case here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but since you're converting it back to a list type later on, might as well have it as a list in the first place. just for cleaner code that's all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove redundant lines and comments, and test the code. I'll merge the PR.
Current state of code is for testing purposes. Commented lines need to be un-commented and a few other lines need to be removed for proper functionality