Skip to content

Instantly share code, notes, and snippets.

@le0nidas
Created December 16, 2020 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save le0nidas/2e932f857a690abc74b024f68f3dc3c3 to your computer and use it in GitHub Desktop.
Save le0nidas/2e932f857a690abc74b024f68f3dc3c3 to your computer and use it in GitHub Desktop.
val animals = listOf("Lion", "Penguin", "Giraffe", "Whale", "Shark")
val usernames = animals.map {
val randomNumber = Random.nextInt(0, 10)
val randomCharacter = listOf("!", "@", "$", "%", "#")[Random.nextInt(0, 5)]
"$it$randomCharacter$randomNumber"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment