I was working with FastApi over a week and writing down the function .. I got to notice that there is two kinds of method we can write for url mapping :
(1) def index