Dot notation: do we always have to start by writing "print" and then len(subject)?


#1

question though. so while writing a code regarding "Dot Notation", do we always have to start by writing "print" and then len(subject)?


#2

Not unless asked to write it. Read the lesson and follow instructions closely.


#3

what about writing it freely, as in not using codecademy and using our own terminal?


#4

The print statement is only used for one purpose, output to the console. There is no requirement other than our own intention to display something.

my_str = "this is a string value with length"
my_str_len = len(my_str)
print my_str, my_str_len