from PyInquirer import prompt widget = [ { 'type':'input', 'name':'myVar', 'message':'Your data please :' } ] result = prompt(widget) print('Your answer is') print(result["myVar"])