Answer the question
In order to leave comments, you need to log in
I am writing a bot for a game that will go to the file path and copy 1 line from txt, how to do this?
I want to create a decorator, I write def copy_pass(): , then open, and then.....? supposedly you need to write somehow the path to the file and the command for python - copy the first line
Answer the question
In order to leave comments, you need to log in
with open(path_to_file.txt, 'r') as file:
text = file.readline()
print(text)
Dude, reading files is now in school, read at least one short tutorial on python
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question