Since I've been learning Python, I've sometimes seen beginner examples that look like this:
sum_sq = [None] * 1_000
I've bought three Python books and none have mentioned what the 1_000
and 100_000
means that I'm seeing in these examples.
My question is: is 1_000
the same as 1,000? And if so, why do they write it as 1_000
? Does it have a special function that 1,000 does not? Things like:
if __name__ == __main__
have sensible reasons for using the underscore and I can't see a reason why 1_000
is used.