r/Python • • Aug 05 '19

Python's response to MATLAB

Post image
4.3k Upvotes

372 comments sorted by

View all comments

Show parent comments

-3

u/mexiKobe Aug 05 '19

It’s self-explanatory though. If you set i or j equal to something else.. that’s what it will equal.

10

u/Eurynom0s Aug 05 '19

Again, Matlab is targeted at non-programmers, which is the kind of audience you might expect to assume that the scope of the ijk being used as loop variables is restricted to the loop.

0

u/[deleted] Aug 05 '19

[deleted]

3

u/IcecreamLamp Aug 05 '19

They're often used as counter variables in a loop. If you then later want to use i as the imaginary number, it will instead have the same value it had when you exited the loop.

→ More replies (1)