rl_savehistory()
Save the history to the specified file
rl_savehistory(file_path)
file_path
(string) — A file path to be saved
boolean
— Returns true
if operation succeeded, and returns false
if otherwise
import rl
rl_savehistory("history.txt")