79639417

Date: 2025-05-26 18:25:28
Score: 1.5
Natty:
Report link
    `if 'add'in user_action:
    todo = user_action[4:]
    todo = todo + "\n"
    with open('todos.txt', 'r') as file:
        todos = file.readlines()

    todos.append(todo)


    with open('todos.txt', 'w') as file :
        file.writelines(todos)`

this will solve the issue

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Krrish