I am within my first week of python coding. well, first week of coding ever. I am trying to do a random name generator. However, I want to have it that if certain letters are chosen, another letter is added
I have lists for the consonants and vowels:
import random
vowels = ["a","e","i","o","u","y"]
consonants = ["b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","z"]
first = (consonants[random.randint(0,19)])
second = (vowels[random.randint(0,5)])
third = (consonants[random.randint(0,19)])
...
(however many letters desired. might do more randomness up to x letters)
However, I wanted:
if first == "q":
first == "qu"
Let's say qezba was the name generated. I am trying to make conditions so that if a "q" is the first letter, it auto adds a "u" onto the string of the variable first. Or, if an "l" was the third letter, to add a "j" after it, half of the time
How could this be done?