Read standard input Use the readln() function to read data from the standard input. It reads the whole line as a string: You can also read multiline input as one string.