Skip to content

Instantly share code, notes, and snippets.

@ArtyomKozyrev8
Created September 11, 2023 09:33
Show Gist options
  • Save ArtyomKozyrev8/c626c84941b01682375e4a25f46eed6c to your computer and use it in GitHub Desktop.
Save ArtyomKozyrev8/c626c84941b01682375e4a25f46eed6c to your computer and use it in GitHub Desktop.
example for Roman - very long list comprehension
INPUT_DATA = [
["a", "111", "a1", "a11"],
["---------------------"],
["b", "222", "b2", "b22"],
["_____________________"],
["c", "333", "c3", "c33"],
["_____________________"],
]
if __name__ == '__main__':
print(
"; ".join(
[
value[-1] for index, value in enumerate(INPUT_DATA) if index % 2 == 0
]
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment