from googletrans import Translator, LANGUAGES import csv import random
# Load data from csv file data = [] with open('cosmetic_tools.csv') as f: reader = csv.reader(f) for row in reader: data.append(row)
# Create a translator object translator = Translator()
# Randomly select a beauty tool and translate its name random_tool = random.choice(data) translated_name = translator.translate(random_tool[0], dest=LANGUAGES['french']).text