12345
Back to Lesson

Pairing Coordinates

Parallel process arrays seamlessly executing zip features.

Instructions

  • Given
    x_coords = [5, 10, 15]
    and
    y_coords = [-2, 4, 8]
    .
  • Generate a list of formatting strings matching positional pairs.
  • Loop through
    zip(x, y)
    and print the respective pairs inside a string formatted like
    Point (X, Y)
    .
main.py
main.py