πŸ“Š Python
Q. What is the output of this code snippet?
Code:
print(list(range(1, 10, 3)))
  • (A) [1, 2, 3, 4, 5, 6, 7, 8, 9]
  • (B) [1, 4, 7]
  • (C) [3, 6, 9]
  • (D) [1, 3, 6, 9]
πŸ’¬ Discuss
βœ… Correct Answer: (B) [1, 4, 7]

Explanation: `range(1, 10, 3)` starts at 1, goes up to 9 with step 3.

Explanation by: Mr. Dubey
`range(1, 10, 3)` starts at 1, goes up to 9 with step 3.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
58
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
92%
Success Rate