In Python, you can add annotations to the arguments and to the return value of a function. Annotations give the user of the function and idea of what kind of data type that function is working with. You access annoutations via the _annotations_ attribute as shown in the example, or via the help function: "print(help(power))". Notice that annotations can potentially help the IDE to give you hints, but the compiler will not prevent any type errors if, for example, you return a string instead of an annotated integer.
#function #annotation #datatype
#python #python3 #development #developer #programming #it #coding #program #programmer #programminglanguage #code #coding #pythonprogramming #pythoncode #software
#softwaredeveloper #geek #computers #learntocode #learnpython