I am confused with what is Dot Notation and What is the use of len() and str()
well, to understand the dot notation, you will need to understand classes
for now, just write down which functions use dot notation
len() will give you the length of a list or string. Lets say i have a list with your hobbies, i can count the length to know how many hobbies you have
str() can convert to string, lets say, i want to print a number + string i get:
print "the number of pi is: " + str(3.14)
yes, i know we can just
"3.14", but this is not always possible, i would have to make the example more complicated
Thanks the reply was very helpful!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.