Please write me a Python code that will take any "input" book title, add it to a list, and when the user inputs "done", sort the list alphabetically and save it in a file.
system
kripaya mujhe ek paythan code likhen jo kisi bhi "input" book sheershak ko le jayega, ise ek suchi main jod degaa, or jab upyogkarta input "kiya", suchi ko varnanukram main krambaddh karen or ise ek fil main sahejen.
user
`` `
# pustak sheershak rakhane ke liye ek suchi banaaen
book_titles = []

# jab tak "kiya gaya" input ke liye puuchhen
jabaki sach:
    sheershak = input ("ek pustak sheershak darj karen (yaa chhodane ke liye 'kiya'):")
    yadi sheershak == 'kiya':
        # loop chodo
        todna
    
    # anyathaa suchi main sheershak joden
    book_titles.append (sheershak)

# ek baar ho jane ke baad, suchi ko varnanukram main krambaddh karen
book_titles.sort ()

# ek fil kholen, or prayek sheershak ko fil main likhen
open ("books.texti", "dablyoo") ke saath epa ke rup main:
    Book_titles main sheershak ke liye:
        F.Write (sheershak + "\ n")
`` `

yah script pehle pustakon ke sheershak rakhane ke liye `book_titles` naamak ek suchi banaaegi.yah `true` ke liye ek` jabaki `loop set kaa upyog karata he taaki loop tab tak anishchit kaal tak jari rahegaa jab tak ki yah tut jaataa he, or ek` if` statement `jabaki` loop main ambeded ho jaataa he taaki yadi upyogkarta "kiya gaya", loop he, to loop he.tutaa hua.prayek sheershak upyogkarta `input ()` kathan main pravesh karata he, jab tak ki loop tuutane tak suchi main `.append ()` ke saath suchi main joda jaataa he.tuutane par, code suchi ko `.sort ()` kaa upyog karke varnmaala kram main daal degaa.`open wyeth open ()` ek fil ko "books.texti" naamak ek fil kholta he yaa yadi koi fil nahin milti he, to file ko rhite mod main daalane ke liye or kol karne yogya char ko paribhaashit karne ke liye `f` kaa upyog karata he.`For` loop` book_titles` suchi main prayek item par punrariti karegaa, prayek ko ek nai line par fil main likhnaa hoga.agar yah aapke kaam kaa he, to mujhe bataaen!
assistant
<|system|>
</s>
<|user|>
kripaya mujhe ek paythan code likhen jo kisi bhi "input" book sheershak ko le jayega, ise ek suchi main jod degaa, or jab upyogkarta input "kiya", suchi ko varnanukram main krambaddh karen or ise ek fil main sahejen.</s>
<|assistant|>
`` `
# pustak sheershak rakhane ke liye ek suchi banaaen
book_titles = []

# jab tak "kiya gaya" input ke liye puuchhen
jabaki sach:
    sheershak = input ("ek pustak sheershak darj karen (yaa chhodane ke liye 'kiya'):")
    yadi sheershak == 'kiya':
        # loop chodo
        todna
    
    # anyathaa suchi main sheershak joden
    book_titles.append (sheershak)

# ek baar ho jane ke baad, suchi ko varnanukram main krambaddh karen
book_titles.sort ()

# ek fil kholen, or prayek sheershak ko fil main likhen
open ("books.texti", "dablyoo") ke saath epa ke rup main:
    Book_titles main sheershak ke liye:
        F.Write (sheershak + "\ n")
`` `

yah script pehle pustakon ke sheershak rakhane ke liye `book_titles` naamak ek suchi banaaegi.yah `true` ke liye ek` jabaki `loop set kaa upyog karata he taaki loop tab tak anishchit kaal tak jari rahegaa jab tak ki yah tut jaataa he, or ek` if` statement `jabaki` loop main ambeded ho jaataa he taaki yadi upyogkarta "kiya gaya", loop he, to loop he.tutaa hua.prayek sheershak upyogkarta `input ()` kathan main pravesh karata he, jab tak ki loop tuutane tak suchi main `.append ()` ke saath suchi main joda jaataa he.tuutane par, code suchi ko `.sort ()` kaa upyog karke varnmaala kram main daal degaa.`open wyeth open ()` ek fil ko "books.texti" naamak ek fil kholta he yaa yadi koi fil nahin milti he, to file ko rhite mod main daalane ke liye or kol karne yogya char ko paribhaashit karne ke liye `f` kaa upyog karata he.`For` loop` book_titles` suchi main prayek item par punrariti karegaa, prayek ko ek nai line par fil main likhnaa hoga.agar yah aapke kaam kaa he, to mujhe bataaen!</s>
