PygLatin 4/11


I completed this exercise and did it correctly, but I have a question about a different way of doing it, out of curiosity.

Could we potentially use raw_input instead of the “original” variable, like this? If not, why not?

original = raw_input("Enter a word: ")
if len(raw_input) > 0:
print raw_input
print “empty”


raw_input is a variable, so, sure.
But you’re not assigning any value to it, so what would make it refer to your string?
And why would you discard the value that raw_input already refers to?


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