You can read input from a text file using Python's built-in open() function, often inside a with block to ensure the file gets closed after reading. For example: with open('input.txt', 'r') as file: data = file.read() will read the entire file into a variable called data.