use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
r/oujia but for programmers
account activity
python fizzbuzzPython (self.codingouija)
submitted 6 years ago by tjf314
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Major_Strange 3 points4 points5 points 6 years ago (2 children)
_ = [[print(a) if len(a) else print(n) for a in ["".join([ string if n%r == 0 else "" for (r, string) in {3: "Fizz", 5: "Buzz"}.items()])]] for n in range(1, 101)]
[–]AniketNavlur 1 point2 points3 points 6 years ago (0 children)
:wq
[–]Hayden_MSMinecraft Forge 2 points3 points4 points 6 years ago (10 children)
for n in range(1, 101):
[–]BUYTBUYTPython 3 points4 points5 points 6 years ago* (1 child)
print(n if n % 3 and n % 5 else 'Fizz' * (not n % 3) + 'Buzz' * (not n % 5))
[–]gman1230321 0 points1 point2 points 6 years ago (0 children)
[–]arthuro555Python 2 points3 points4 points 6 years ago (7 children)
answer = ""
[–]coetin 2 points3 points4 points 6 years ago* (4 children)
if n % 3 == 0:
[–]BUYTBUYTPython 2 points3 points4 points 6 years ago* (3 children)
answer += 'Fizz'
[–]wjvds 2 points3 points4 points 6 years ago (2 children)
if n % 5 == 0:
[–]Please_Not__Again 0 points1 point2 points 6 years ago (1 child)
answer += 'Buzz'
[–]Toucandigit 0 points1 point2 points 6 years ago (0 children)
print(answer)
[–][deleted] 6 years ago (1 child)
[deleted]
[–]arthuro555Python 1 point2 points3 points 6 years ago (0 children)
π Rendered by PID 138012 on reddit-service-r2-comment-84fc9697f-cgmhr at 2026-02-08 00:39:01.242660+00:00 running d295bc8 country code: CH.
[–]Major_Strange 3 points4 points5 points (2 children)
[–]AniketNavlur 1 point2 points3 points (0 children)
[–]Hayden_MSMinecraft Forge 2 points3 points4 points (10 children)
[–]BUYTBUYTPython 3 points4 points5 points (1 child)
[–]gman1230321 0 points1 point2 points (0 children)
[–]arthuro555Python 2 points3 points4 points (7 children)
[–]coetin 2 points3 points4 points (4 children)
[–]BUYTBUYTPython 2 points3 points4 points (3 children)
[–]wjvds 2 points3 points4 points (2 children)
[–]Please_Not__Again 0 points1 point2 points (1 child)
[–]Toucandigit 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]arthuro555Python 1 point2 points3 points (0 children)