Skip to content

Instantly share code, notes, and snippets.

@PallawiSinghal
Created February 22, 2022 08:54
Show Gist options
  • Save PallawiSinghal/67c9bf32981e60ea4fb6faa85d79902f to your computer and use it in GitHub Desktop.
Save PallawiSinghal/67c9bf32981e60ea4fb6faa85d79902f to your computer and use it in GitHub Desktop.
list_annotations = [247, 1202, 268, 1206, 262, 1232, 242, 1227, 247, 1202]
res = [(f , q) for f, q in zip(list_annotations[::2], list_annotations[1::2])]
print(res)
#output
#[(247, 1202), (268, 1206), (262, 1232), (242, 1227), (247, 1202)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment