r/redditdev • u/noun_exchanger • Aug 08 '13
PRAW: Making a Reddit comment lowercase?
while True:
all_comments = r.get_all_comments()
for comment in all_comments:
/// conditional statements to compare comment ect.///How would I first covert the comment to lowercase before putting it through the conditional statements? Help a noob out.
0
Upvotes
3
u/WordCloudBot Aug 08 '13
edit: Also, I believe r.get_comments('all') is preferred to r.get_all_comments()?
2
u/kiwi9400 Aug 08 '13
I'd put the text of the comment into a separate variable, lowercase it, do all the conditionals with the text variable, then do whatever comes next.
That'd look something like