Static Typing

def adder(first:int,second: int) -> int :
return first+second

adder(1.1,2.2) ==>>3.3000000000000003

I would like to know why the error is not raised ?

What do you mean? Python is not statically typed! What you did is type hinting … . You can use a type checker such as mypy to find errors before runtime.

Thanks for respone.
Quick question: how to find length of list without using any loop or inbuilt function.
Thanks in advance

You definitley should read a Python tutorial. This one is pretty short: https://www.kaggle.com/learn/python

To answer your question:

planets = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune']

# How many planets are there?
len(planets)