YOU SAID:
def runner(): inp=input("enter what you want to do: \n1. read current file \n2. add to current file\n") if inp == "1": f = open("file.txt","rt") print(f.read()) f.close() elif inp == "2": add() else: print("enter a valid number") runner() def add(): f = open("file.txt","at") charsheet = { "Name": input("enter character's name:"), "Race": input("enter character's race:"), "Age": input("enter character's age:"), "Title(s)/Nickname(s)": input("enter character's titles/nicknames:"), "Job(s)": input("enter character's jobs:"), "Powers/Abilities/Skills":input("enter character's Powers or skills:"), "Birthplace":input("enter character's birthplace:"), "Residence":input("enter character's current residence:"), "Weaponry":input("enter character's weaponry:"), "Other Details":input("enter any other details:"), "Appearance":input("enter a description of the character's appearance:"),} title= input("enter title of character sheet:") f.write(title) f.write("\n") for i,j in charsheet.items(): f.write(i+" : "+j) f.write("\n") f.close() runner()
INTO JAPANESE
def runner():inp = input( "やりたいことを入力:\ n1。現在のファイルを読む\ n2。現在のファイルに追加\ n")if inp == "1":f = open( "file.txt "、" rt ")print(f.read())f.close()elif inp ==" 2 ":add()else:print("有効な数字を入力 ")runner()def add():f = open( "file.txt"、 "at")char
BACK INTO ENGLISH
def runner (): inp = input ("Enter what you want to do: \ n1. Read the current file \ n2. Add to the current file \ n") if inp == "1": f = open ("file. txt "," rt ") print (f.read ()) f.close () elif inp ==" 2 ": add () else: print (" Enter a valid number ") runner () def add () : F = open ("fil
INTO JAPANESE
def runner():inp = input( "やりたいことを入力:\ n1。現在のファイルを読む\ n2。現在のファイルに追加する\ n")if inp == "1":f = open( "file 。txt "、" rt ")print(f.read())f.close()elif inp ==" 2 ":add()else:print("有効な数字を入力してください ")runner()def add() :F =オープン( "fil
BACK INTO ENGLISH
def runner (): inp = input ("Enter what you want to do: \ n1. Read the current file \ n2. Append to the current file \ n") if inp == "1": f = open ("file .Txt "," rt ") print (f.read ()) f.close () elif inp ==" 2 ": add () else: print (" Please enter a valid number ") runner () def a
INTO JAPANESE
def runner():inp = input( "やりたいことを入力:\ n1。現在のファイルを読む\ n2。現在のファイルに追加する\ n")if inp == "1":f = open( "file .Txt "、" rt ")print(f.read())f.close()elif inp ==" 2 ":add()else:print("有効な数字を入力してください ")runner()def a
BACK INTO ENGLISH
def runner (): inp = input ("Enter what you want to do: \ n1. Read the current file \ n2. Append to the current file \ n") if inp == "1": f = open ("file .Txt "," rt ") print (f.read ()) f.close () elif inp ==" 2 ": add () else: print (" Please enter a valid number ") runner () def a
Come on, you can do better than that.