Kisaran inklusif 2 hingga 5 di Python

# range(2, 6)
for idx in range(2, 6):
    print(idx, end=" ")  # 2 3 4 5
Wissam