expect is best used to manage scripts that display requests and require a response. Many other languages struggle with this and create deadlocks on stdin / stdout when trying to use both. Also expect to overcome some password problems (for example, when writing SSH scripts).
Having said that, there is no need to know, because many other languages have a wait module (tcl and python) that provide the same behavior.
, . FTP, .