The list my_list is created using a list comprehension. The expression [0 for i in range(1, 3)] generates a list containing the value 0 for each number in the range from 1 to 2 (inclusive of 1 and exclusive of 3).
So, the range range(1, 3) produces two numbers: 1 and 2.
Therefore, the list my_list will contain 2 elements, both of which are 0.
Hence, my_list contains 2 elements.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
hovnival
1 month, 1 week agochristostz03
5 months, 2 weeks ago