“python salve entrada no arquivo de texto” Respostas de código

python salve entrada no arquivo de texto

#Simple Mood Diary Script As An Example#

print('My Mood Diary')
mood = input('How are you feeling today? ')
#Saves the input as the variable 'mood'#
text_file = open("MoodDiary.txt", "w")
#Opens or creates the .txt file, sharing the directory of the script#
text_file.write(mood)
#Writes the variable into the .txt file#
text_file.close()
#Closes the .txt file#
Ruukasu

python salve entrada no arquivo de texto

Simple Mood Diary Script As An Example#

print('My Mood Diary')
mood = input('How are you feeling today? ')
#Saves the input as the variable 'mood'#
text_file = open("MoodDiary.txt", "w")
#Opens or creates the .txt file, sharing the directory of the script#
text_file.write(mood)
#Writes the variable into the .txt file#
text_file.close()
#Closes the .txt file#
Combative Caribou

Respostas semelhantes a “python salve entrada no arquivo de texto”

Perguntas semelhantes a “python salve entrada no arquivo de texto”

Procure respostas de código populares por idioma

Procurar outros idiomas de código