Incorrect output on sublime text 3

alt textI recently started learning python i wrote following code :

x=raw_input("Enter Name")

print x[0]

this program works as expected in pycharm but in sublime text 3 it justs prints Enter Name and after that if i enter something it shows nothing and neither gets terminated.What could be the possible issue???

1 Like

Try compiling in terminal instead of editor.I dont know why it doesn’t working in sublime editor but after writing code compile and run it on terminal.

Here is the procedure:

1.Go to the saved prgram location using cd command.

2.compile and run it using python

3.Type your input and you are good to go.

Happy coding!

i guess this should print the first character of what we entered

It’s working correctly for me…you should check it again…

tried but problem still there pycharm working fine but facing issues with sublime text 3

pls post the screenshot if possible…you must be doing something wrong.Are you pressing enter before writing the string?

@ayushagg31 no i am entering string first.
(attached screenshot)