Indentations in python while writing code is not consistent, try writing python code with in any problem if i enter from a if statement the double indentation is used, which is very confusing and not what we use to…