I’m trying to translate a game There are 60 thousand rows
i need to extract all russian text with a loop to new txt file and
After the translation is finished, I need to put them back in order.
how can i do this in python or other easy way. How can I copy text after the equals symbol in loop?
test=ПРОЦЕСС ПРЕРВАН
test2=АВТОРИЗОВАННЫЙ ДОСТУП
test3=Доступ к базе данных
test4=Подделка записей
test5=Анализируется
test6=Требуется биометрическое сканировани
>Solution :
You can split the string by the "=" character and stop it after the first occurrence.
# lines are the lines of your file
for line in file_lines:
# This will split your string into an array for every time that finds an 'equal' character.
# Using 1 as second parameter will stop the split action after the first occurrence
# after that you need just to write this new variable into your second file
formatted_line = line.split("=", 1)[1]