What am I doing wrong?


#1

On line 3, create the variable my_string and set it to any string you'd like.
On line 4, print the length of my_string.
On line 5, print the .upper() case version of my_string.

My code:
my_string = "brown"
print len("my_string")
print my_string.upper()

Oops, try again. Did you remember to print len(my_string)?


#2

print len("my_string") #prints 9.length of the my_string

and

print len(my_string) #prints 5.length of the brown

are not same.

anything inside " " is string.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.