Python Forum

Full Version: Code isn't working in several IDE's when other people are getting desired output.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
my question here

names = ["daken" , "deadpool" , "elixir" , "cypher" ]

you = names.pop(0)

v = str(input('Enter a question'))

if v == "Who am I ? ":
    print("You are" , you )

else:
    print("You're irrelevant") 
don't comment on my coding i am not trynna achieve anything just trynna understand what the various statements and methods do. I have tried the code in aptana, pyscripter and pycharm none of them give me output but say syntax error and pycharm automatically prints else. strangely pyfiddle gets output. Weird. Please help.
Runs for me, you do realize that the question must be verbatim,
including the ? and all spaces in order to execute if condition right?

You should show the actual error message (in it's entirety) as you should not get a syntax error
If you have this in a loop, it will fail after the list is exhausted (item is removed from list with pop