Can someone explain to me how this code works ? It prints numbers from 0 to 100, but I cannot understand how.
print(*range(True,ord("e")))
ord accepts a character and returns the ASCII code. In this case "e" returns 101. The *range is unpacking the iterable that range creates. Enabling you to print out the values from True (1) to 101 - 1.
I found this out by googling each piece of code individually. Type in "ord python" then another search was "star range python". These searches lead to information you are seeking.
print(*range(True,ord("e")))
Firstly, print() means that we are displaying some information on the screen.
Secondly, the * indicates that there may be more than one object to be printed.
Now, think of the True as a 0. True does nothing. The ord("e") means where is e in the Unicode. It returns that number, which is 101. Now, range(start, end) means every value between the start value (0), and end value (1).
*operator does?