79710237

Date: 2025-07-22 09:49:27
Score: 2.5
Natty:
Report link

import numpy as np

i = np.arange(2, 4) # i = [2, 3]

a = np.arange(5) # a = [0, 1, 2, 3, 4]

a[i] = 0 # directly modify a at positions 2 and 3

print(a)

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Sandip Roy