Python question

Asked 2 years ago, Updated 2 years ago, 16 views

input = open("keyword.txt", "rt", encoding="utf8")

output = open("output.txt", "wt", encoding="utf8")

with input, output: while True:

    chunk = input.read(4096)

    if not chunk:
        break

    chunk = chunk.replace("\u000B", "")

    chunk = chunk.replace ("cm", "cm")
    chunk = chunk.replace ("mm", "millimeter")
    chunk = chunk.replace("m", "meter")

    chunk = chunk.replace (".", "dot")
    chunk = chunk.replace("?"), "question mark)
    chunk = chunk.replace ("!", "exclamation mark")

    chunk = chunk.replace ("+", "plus")
    chunk = chunk.replace ("-", "minus")
    chunk = chunk.replace ("x", "multiplied")
    chunk = chunk.replace ("÷", "divide")
    chunk = chunk.replace("=", "" is ")


    output.write(chunk)

I want to write the numbers in Korean on this structure I don't know what to do. There's a hundred decimal places, so I don't know how to add a formula. Help me

python

2022-09-22 16:10

1 Answers

You asked the same question You have answered this .


2022-09-22 16:10

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.