Python Forum
Code isn't working in several IDE's when other people are getting desired output. - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Code isn't working in several IDE's when other people are getting desired output. (/thread-4099.html)



Code isn't working in several IDE's when other people are getting desired output. - SuperSymmetry - Jul-22-2017

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.


RE: Code isn't working in several IDE's when other people are getting desired output. - Larz60+ - Jul-22-2017

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