Step 1: Create a file pythonrc at /etc/ directory and add the following lines in the file:
from readline import parse_and_bind
import rlcompleter
parse_and_bind("tab: complete")
export PYTHONSTARTUP=/etc/pythonrc
Step3: Restart the terminal and invoke python interpreter.