3.16 It's saying I didn't make a string... help?


my_string = "kittens!"
print (len)my_string
print my_string.upper()

The error says "Oops, try again. Did you create a variable called my_string?

What should I do?



you will have to use

print len(my_string)

in your code...

google search
== the Book ==
topic: 5.6.1. String Methods


Thank you very dearly!!


my_string = "valuable"
print len("my_string")

the error says :

File "python", line 3
my_string = "valuable"
IndentationError: unexpected indent
How can I solve this?


when you said it should be this
print len("my_string")
The speech marks,Quotes should not be there .

  1. print len("my_string") --> wrong
    print len(my_string) --> correct

You quoted variable name my_string.

  1. python use indentation, maybe you added one ore more space in front of my_string. You have to use only 4 spaces in front of my_string = "valuable", delete the other