343
Gambling with Lain
(lemmy.world)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Oh right. I thought it might work the same as range etc in python, where is does one less than you specify.. Coming from, well every other language this really threw me off on my first python excursion.
Any language... except MATLAB. Fuck MATLAB.
(Their arrays even start at 1, what the fuck?!)
Lua starts at 1 too. It's infuriating. I believe for the same historical reason Matlab does.
Both meant for non CS people.
You can get the exclusive behaviour with
random.randrange
. (Relevant Stack Overflow question with a somewhat interesting answer)