raw_input("") original=raw_input empty_string="" if len(original)>0: print original else: print"empty"
I am not 100% sure what your error is stemming from but I think the raw input function is the culprit. It takes the user input and turns it into a string. You can assign that input to a variable in one line. eg.
original=raw_input("enter a word")
this will have "enter a word" pop up in the terminal and when you type your word it will be assigned to original.
also you do not need to declare empty_string. you can do that on the fly when you start with the string modulation.
okay thank you! ill will try and see if it works and let you know.
Traceback (most recent call last):
File "python", line 6, in
TypeError: object of type 'builtin_function_or_method' has no len()
i still get the same error
so i thought i was prevously replying to you, but it turns out that you can directly reply to the person lol. uhhh anywho i did was you said and im still getting the same error
wait nvm i was ding dong and forgot to put the raw_input on just one line.. it wokred
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.