code: def multiline_input():
      
      lines = []
      while True:
          try:
              lines.append(input())
          except EOFError:
              break
  
      return "\n".join(lines).strip()
docs: Lets user input multiple lines of text, terminated by EOF.