Skip to content

Instantly share code, notes, and snippets.

@tobchen
Created October 30, 2021 12:27
Show Gist options
  • Save tobchen/7a347ef5c9d9cb39f76034c0024e488f to your computer and use it in GitHub Desktop.
Save tobchen/7a347ef5c9d9cb39f76034c0024e488f to your computer and use it in GitHub Desktop.
List movies to watch for Shane-Mas
import sys
import random
movies = [
"Lethal Weapon (1987)",
"The Monster Squad (1987)",
"Lethal Weapon 2 (1989)",
"The Last Boy Scout (1991)",
"Last Action Hero (1993)",
"The Long Kiss Goodnight (1996)",
"Kiss Kiss Bang Bang (2005)",
"Iron Man 3 (2013)",
"The Nice Guys (2016)",
"The Predator (2018)"
]
if len(sys.argv) > 1:
if "s" in sys.argv[1]:
random.shuffle(movies)
if "l" in sys.argv[1]:
l1 = movies.index("Lethal Weapon (1987)")
l2 = movies.index("Lethal Weapon 2 (1989)")
if l2 < l1:
movies[l1], movies[l2] = movies[l2], movies[l1]
if "k" in sys.argv[1]:
movies.remove("Kiss Kiss Bang Bang (2005)")
movies.append("Kiss Kiss Bang Bang (2005)")
output = [
"List Shane-Mas movies:",
"python shane-mas.py [flags]",
"Flags:",
"s - shuffle",
"l - guarantee Lethal Weapon order",
"k - put Kiss Kiss Bang Bang at the end",
"",
*movies
]
print("\n".join(output))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment