Issue
It gives me an empty list if I didnt put x=list(range(a, b, -1)) again in the loop while, why ?
Thanks.
Solution
If a < b
then the range will be created as an empty range. The range won't magically update when a
and b
gain new values because the values have already been assigned to the range. That's why you have to recreate the range with the updated values of a
and b
.
Answered By - Aplet123 Answer Checked By - Marilyn (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.