french

Python print french characters to another file

Python print french characters to another file Question: Whenever I print a french character (for example "é") in another file using python, it changes it to a weird character. program.py: f = open("file.txt", ‘w’) print("é, è, ç", file=f) file.txt: �, �, � So please does anyone know how to print out french characters to any …

Total answers: 2

I've a probleme with tkinter, with the pady

I've a probleme with tkinter, with the pady Question: Here is my code: (sorry it’s in french) from tkinter import * # creer la fenetre window = Tk() window.title("Interface projet-NSI vacances noel") window.geometry("1080×720") window.iconbitmap("ricardo.ico") window.config(background=’#4065A4′) # creer la frame principale frame = Frame(window, background="#4065A4") # creer des sous boites top_left_frame = Frame(window, background="#4065A4") # creer …

Total answers: 1

Python: replace french letters with english

Python: replace french letters with english Question: I would like to replace all the french letters within words with their ASCII equivalent. letters = [[‘é’, ‘à’], [‘è’, ‘ù’], [‘â’, ‘ê’], [‘î’, ‘ô’], [‘û’, ‘ç’]] for x in letters: for a in x: a = a.replace(‘é’, ‘e’) a = a.replace(‘à’, ‘a’) a = a.replace(‘è’, ‘e’) a …

Total answers: 5