How I can read the content of a file and keep it i

Hello! I need help me to solve the following case: How I can read the content of a file and keep it in a variable?