The simplest input can be obtained with io.read(). This will read one line from standard input (usually a keyboard, but can be redirected, for example, from a file).
You can use it as follows:
io.write('Hello, what is your name? ')
local name = io.read()
io.write('Nice to meet you, ', name, '!\n')
io.read() io.input():read(), io.write() io.output():write(). API read() .
, io.write() , , print().