Created
July 21, 2019 19:31
-
-
Save Storager/5b0d26f01a7aee7f43311e7e3b958ee3 to your computer and use it in GitHub Desktop.
my_l is a list of release tags from docker repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| my_l = sorted(my_l, key = lambda x: (int(x.split('-',2)[1].split('.')[0]), int(x.split('-',2)[1].split('.')[1]))) | |
| print(my_l) | |
| i=0 | |
| cure = "" | |
| while i < 10: | |
| cure = my_l[len(my_l)-1].split('-',2)[1].split('.')[1] | |
| print(cure) | |
| while cure in my_l[len(my_l)-1]: | |
| my_l.pop(len(my_l)-1) | |
| i = i+1 | |
| print(my_l) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment