Skip to content

Instantly share code, notes, and snippets.

@stephengruppetta
Created December 7, 2023 09:28
Show Gist options
  • Save stephengruppetta/8bca0705ff26568464c6a84343ce1919 to your computer and use it in GitHub Desktop.
Save stephengruppetta/8bca0705ff26568464c6a84343ce1919 to your computer and use it in GitHub Desktop.
some_names = [
"Robert",
"Ishaan",
"Max",
"Trevor",
"Alexandra",
"Albert",
"Christine",
]
some_names.sort(
key=lambda item: item.lower().count("a")
)
print(*some_names, sep="\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment