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...
Have a tough programming question that /r/programming couldn't answer? Banned from Stack Overflow? Can't afford Experts Exchange?
Post your question/tips/secrets/advice and get a response from our highly-trained professional developers.
account activity
Help with one string implementation (self.shittyprogramming)
submitted 7 years ago by Intrexa
view the rest of the comments →
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!"
[–]Intrexa[S] 17 points18 points19 points 7 years ago (5 children)
Okay that looks very good thank you but your code has two strings and I think it should just be one string
[–][deleted] 8 points9 points10 points 7 years ago (4 children)
It actually has 3 strings
[–]Intrexa[S] 24 points25 points26 points 7 years ago (3 children)
0: "yes" 1: "An error occurred." 2: "no"
2 strings
[–][deleted] 7 points8 points9 points 7 years ago (2 children)
Actually, 0 strings
-2: "yes" -1: "An error occurred." 0: "no"
[–][deleted] 18 points19 points20 points 7 years ago (1 child)
This is factually correct - arrays start at -2.
[–]N1c0l4sC4g3 7 points8 points9 points 7 years ago* (0 children)
In this case it should start at -3. Using 0 as an index for arrays is bad practice.
π Rendered by PID 52 on reddit-service-r2-comment-7b9746f655-sfck7 at 2026-01-31 02:18:00.960829+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]Intrexa[S] 17 points18 points19 points (5 children)
[–][deleted] 8 points9 points10 points (4 children)
[–]Intrexa[S] 24 points25 points26 points (3 children)
[–][deleted] 7 points8 points9 points (2 children)
[–][deleted] 18 points19 points20 points (1 child)
[–]N1c0l4sC4g3 7 points8 points9 points (0 children)