Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # def get_lines(file, start, end):
- # _code_snippet = ""
- # _generate_code = (x for i, x in enumerate(file) if i in range(start, end))
- # for _line in _generate_code:
- # _code_snippet += _line
- #
- # return _code_snippet
- #
- #
- # def _read_file(_file_name):
- # read_only_code_snippet = input("Enter 'f' for reading full file: ")
- #
- # if read_only_code_snippet.lower() == 'f':
- # with open(_file_name, 'r') as f:
- # _code = f.read()
- # return _code
- # else:
- # start_line = int(input("Start line: "))
- # end_line = int(input("End line: "))
- #
- # with open(_file_name, 'r') as f:
- # _code = get_lines(f, start_line, end_line)
- # print(_code)
- #
- #
- # _read_file('pastebin_test.py')
- import decouple
- with open('.env', 'a') as f:
- f.write(f"\nusername={'dsfs'}\npass={'afsfdhghg'}")
Add Comment
Please, Sign In to add comment