How to set a variable to a string?


#1

Hi, could someone help me? I am stuck at the lesson on Strings & Console Output.
The task is to create a variable named parrot on line 1 and to set it to the string "Norwegian Blue". How should I do that?

parrot = "Norwegian Blue" 
print len(parrot) =

That's what I've done and Python says this is an invalid syntax. "Oops, try again. Did you create a variable called parrot?". What am I doing wrong?


#2

The stray token = is raising a syntax error. Remove that and your code will be fine.


#3

Thanks a lot!
I was trying to fix the 1st line up for ages...


#4

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