#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Yongqiang Cheng
"""
polylines_list = [1920, 1080, 1280, 720]
interval = 2
polyline_set = []
if (len(polylines_list) % 2 == 0):
for idx in range(0, len(polylines_list), 2):
polyline_set.append([polylines_list[idx], polylines_list[idx + 1]])
else:
print("IndexError: list index out of range.")
print(polyline_set)
[[1920, 1080], [1280, 720]]