rows = int(input("Enter the number of rows for the 2D array: ")) cols = int(input("Enter the number of columns for the 2D array: ")) ...
and retrieves the integer value at that index.