howdoi in Python

howdoi is a command-line tool written in Python. It gives the answers to do basic programming tasks, while working still in the console, directly from the command line. It scrapes code from the top answers on StackOverflow. You need an internet connection for using howdoi.

howdoi will answer all sorts of queries related to programming and coding. Like getting help in syntax, searching for libraries for a specific purpose, resolving errors, using pre-defined functions and their applications, etc.

Command to Install:

pip install howdoi


howdoi QUERY

Other optional arguments are:

  • -h : show this help message and exit
  • -p POS : select answer in specified position (default: 1)
  • -al : display the full text of the answer
  • -l : display only the answer link
  • -c : enable colorized output
  • -n NUM_ANSWERS : number of answers to return
  • -C : clear the cache
  • -v : displays the current version of howdoi


  • howdoi tells us that in C, a comment can be given by using “//”.
  • howdoi tells that python can be exited by using quit()
  • howdoi tells us how to check if a list in python is empty or not.
  • howdoi tells us that the most reccent commit on git can be undone by the following the steps
  • howdoi tells us how to redirect into an another webpage.
  • -l optional argument displays the link of the StackOverflow article from which the answer is taken.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Improved By : Shivam_k, Akanksha_Rai

Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.