ingredientArray = [
  "151 proof rum",
  "7-up",
  "absolut citron",
  "absolut kurant",
  "absolut vodka",
  "allspice",
  "almond",
  "almond flavoring",
  "amaretto",
  "angelica root",
  "angostura bitters",
  "anise",
  "aperol",
  "apple",
  "apple brandy",
  "apple cider",
  "apple juice",
  "apple schnapps",
  "applejack",
  "apricot",
  "apricot brandy",
  "asafoetida",
  "anejo rum",
  "baileys irish cream",
  "banana",
  "banana liqueur",
  "benedictine",
  "berries",
  "bitter lemon",
  "bitters",
  "black pepper",
  "blackberry brandy",
  "blended whiskey",
  "blue curacao",
  "blueberry schnapps",
  "bourbon",
  "brandy",
  "brown sugar",
  "butter",
  "campari",
  "candy",
  "cantaloupe",
  "carbonated soft drink",
  "cardamom",
  "carrot",
  "cayenne pepper",
  "celery salt",
  "chambord raspberry liqueur",
  "champagne",
  "cherry",
  "chocolate",
  "chocolate ice-cream",
  "chocolate syrup",
  "cider",
  "cinnamon",
  "cloves",
  "club soda",
  "coca-cola",
  "cocoa powder",
  "coconut liqueur",
  "coconut rum",
  "coffee",
  "cognac",
  "cointreau",
  "condensed milk",
  "coriander",
  "cornstarch",
  "cranberry juice",
  "cream",
  "creme de banane",
  "creme de cacao",
  "creme de cassis",
  "cumin seed",
  "dark creme de cacao",
  "dark rum",
  "dry vermouth",
  "egg",
  "egg white",
  "egg yolk",
  "espresso",
  "food coloring",
  "frangelico",
  "fresh lemon juice",
  "fresh lime juice",
  "fruit",
  "fruit juice",
  "gin",
  "ginger",
  "ginger ale",
  "ginger beer",
  "glycerine",
  "goldschlager",
  "grain alcohol",
  "grand marnier",
  "grape juice",
  "grape soda",
  "grapefruit juice",
  "grapes",
  "green creme de menthe",
  "grenadine",
  "guava juice",
  "half-and-half",
  "heavy cream",
  "honey",
  "hot chocolate",
  "hpnotiq",
  "ice",
  "<NAME>",
  "jim beam",
  "johnnie walker",
  "jagermeister",
  "kahlua",
  "kirschwasser",
  "kiwi",
  "kummel",
  "lager",
  "lemon",
  "lemon juice",
  "lemon peel",
  "lemon vodka",
  "lemonade",
  "licorice root",
  "light cream",
  "light rum",
  "lime",
  "lime juice",
  "lime peel",
  "malibu rum",
  "mango",
  "maraschino cherry",
  "marjoram leaves",
  "marshmallows",
  "maui",
  "midori melon liqueur",
  "milk",
  "mint",
  "mint syrup",
  "mountain dew",
  "nutmeg",
  "orange",
  "orange bitters",
  "orange curacao",
  "orange juice",
  "orange peel",
  "papaya",
  "passion fruit juice",
  "peach nectar",
  "peach schnapps",
  "peach vodka",
  "peppermint schnapps",
  "pineapple",
  "pineapple juice",
  "pisang ambon",
  "prosecco",
  "roses sweetened lime juice",
  "rum",
  "rumple minze",
  "salt",
  "schweppes russchian",
  "scotch",
  "sherbet",
  "sherry",
  "sloe gin",
  "soda water",
  "sour mix",
  "southern comfort",
  "sprite",
  "strawberries",
  "strawberry liqueur",
  "strawberry schnapps",
  "sugar",
  "sugar syrup",
  "sweet and sour",
  "sweet vermouth",
  "tea",
  "tequila",
  "tomato juice",
  "tonic water",
  "triple sec",
  "vanilla",
  "vanilla extract",
  "vanilla ice-cream",
  "vanilla vodka",
  "vermouth",
  "vodka",
  "water",
  "whipped cream",
  "whipping cream",
  "white creme de menthe",
  "white wine",
  "wild turkey",
  "wine",
  "wormwood",
  "yellow chartreuse",
  "yoghurt"
]

f = open("titleCasedIngredients.txt", "w")

f.write("[\n")
for i in range(len(ingredientArray)):
    ''' Title case all ingredients then write to a file'''
    ingredientArray[i] = ingredientArray[i].title()
    f.write('"')
    f.write(ingredientArray[i])
    f.write('",\n')

f.write("]")
f.close()
ingredientArray = [
  "151 proof rum",
  "7-up",
  "absolut citron",
  "absolut kurant",
  "absolut vodka",
  "allspice",
  "almond",
  "almond flavoring",
  "amaretto",
  "angelica root",
  "angostura bitters",
  "anise",
  "aperol",
  "apple",
  "apple brandy",
  "apple cider",
  "apple juice",
  "apple schnapps",
  "applejack",
  "apricot",
  "apricot brandy",
  "asafoetida",
  "anejo rum",
  "baileys irish cream",
  "banana",
  "banana liqueur",
  "benedictine",
  "berries",
  "bitter lemon",
  "bitters",
  "black pepper",
  "blackberry brandy",
  "blended whiskey",
  "blue curacao",
  "blueberry schnapps",
  "bourbon",
  "brandy",
  "brown sugar",
  "butter",
  "campari",
  "candy",
  "cantaloupe",
  "carbonated soft drink",
  "cardamom",
  "carrot",
  "cayenne pepper",
  "celery salt",
  "chambord raspberry liqueur",
  "champagne",
  "cherry",
  "chocolate",
  "chocolate ice-cream",
  "chocolate syrup",
  "cider",
  "cinnamon",
  "cloves",
  "club soda",
  "coca-cola",
  "cocoa powder",
  "coconut liqueur",
  "coconut rum",
  "coffee",
  "cognac",
  "cointreau",
  "condensed milk",
  "coriander",
  "cornstarch",
  "cranberry juice",
  "cream",
  "creme de banane",
  "creme de cacao",
  "creme de cassis",
  "cumin seed",
  "dark creme de cacao",
  "dark rum",
  "dry vermouth",
  "egg",
  "egg white",
  "egg yolk",
  "espresso",
  "food coloring",
  "frangelico",
  "fresh lemon juice",
  "fresh lime juice",
  "fruit",
  "fruit juice",
  "gin",
  "ginger",
  "ginger ale",
  "ginger beer",
  "glycerine",
  "goldschlager",
  "grain alcohol",
  "grand marnier",
  "grape juice",
  "grape soda",
  "grapefruit juice",
  "grapes",
  "green creme de menthe",
  "grenadine",
  "guava juice",
  "half-and-half",
  "heavy cream",
  "honey",
  "hot chocolate",
  "hpnotiq",
  "ice",
  "<NAME>",
  "jim beam",
  "johnnie walker",
  "jagermeister",
  "kahlua",
  "kirschwasser",
  "kiwi",
  "kummel",
  "lager",
  "lemon",
  "lemon juice",
  "lemon peel",
  "lemon vodka",
  "lemonade",
  "licorice root",
  "light cream",
  "light rum",
  "lime",
  "lime juice",
  "lime peel",
  "malibu rum",
  "mango",
  "maraschino cherry",
  "marjoram leaves",
  "marshmallows",
  "maui",
  "midori melon liqueur",
  "milk",
  "mint",
  "mint syrup",
  "mountain dew",
  "nutmeg",
  "orange",
  "orange bitters",
  "orange curacao",
  "orange juice",
  "orange peel",
  "papaya",
  "passion fruit juice",
  "peach nectar",
  "peach schnapps",
  "peach vodka",
  "peppermint schnapps",
  "pineapple",
  "pineapple juice",
  "pisang ambon",
  "prosecco",
  "roses sweetened lime juice",
  "rum",
  "rumple minze",
  "salt",
  "schweppes russchian",
  "scotch",
  "sherbet",
  "sherry",
  "sloe gin",
  "soda water",
  "sour mix",
  "southern comfort",
  "sprite",
  "strawberries",
  "strawberry liqueur",
  "strawberry schnapps",
  "sugar",
  "sugar syrup",
  "sweet and sour",
  "sweet vermouth",
  "tea",
  "tequila",
  "tomato juice",
  "tonic water",
  "triple sec",
  "vanilla",
  "vanilla extract",
  "vanilla ice-cream",
  "vanilla vodka",
  "vermouth",
  "vodka",
  "water",
  "whipped cream",
  "whipping cream",
  "white creme de menthe",
  "white wine",
  "wild turkey",
  "wine",
  "wormwood",
  "yellow chartreuse",
  "yoghurt"
]

f = open("titleCasedIngredients.txt", "w")

f.write("[\n")
for i in range(len(ingredientArray)):
    ''' Title case all ingredients then write to a file'''
    ingredientArray[i] = ingredientArray[i].title()
    f.write('"')
    f.write(ingredientArray[i])
    f.write('",\n')

f.write("]")
f.close()
Title case all ingredients then write to a file