Python exercise16!


#1



Hey there guys!
I have a problem with exercise 16, this one to be exact:
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 is:


my_string = "ABC"
print len.(my_string)
print my_string.upper()

But it says that I didn't create a variable called my_string... Been looking for it for almost 40minutes and I totally don't know what to do because I can't find the wrong part of it... I'm still a beginner when it comes to python, so I appreciate all advice you can give me.


#2

Hi, @saracherabi ,

Having that . character in this statement makes its syntax incorrect ...

print len.(my_string)

#3

Thank you so much for your help! @appylpye


#4

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