Post

Python Coding
Python Coding@clcoding·
What is the output of following Python Code?
Python Coding tweet media
English
0
0
0
45.2K
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@clcoding Answer: 0 1 (on separate lines) Solution: Let's see what `range` does. If range is used with 2 integer arguments, here is how it works: range( start, stop ) gives an iterable from `start` up to `stop`. The `stop` is NOT included in the iterable. Thus, range(0, 2) is 0, 1 +
English
0
0
0
3.7K
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@clcoding What would be range(0,0)? It would be empty. That's because the stop value (0) is not included in the range. As the start and the stop values are the same, there are no values included in the range. With that in mind, let's analyze the code. +
English
0
0
0
472
Paylaş