Function Parameter STRING or INTEGER | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Function Parameter STRING or INTEGER

The function parameter is taken as a string or any data type. Like if the parameter is 2, the python takes it as a string or an integer.

1st Oct 2020, 4:59 AM
Ayush Dubey
Ayush Dubey - avatar
1 Answer
+ 5
Depends For this example, 2 will be an integer You can set the type of variables by using int() or str() You could get know of the variable type by using type()
1st Oct 2020, 5:44 AM
WenHao1223
WenHao1223 - avatar