I have recently installed sublime text 4 on my system. While running my python code on ST 4, I'm encountering a strange issue which I'm unable to resolve. The following code is suppose to take input from use, Here First name and the second name. after running the code it ask to enter first name and the the second name on the next line but the line that line isn't printing on the editor?! I tried running my code on other editors (pycharm) and online editors and its working just fine giving me the output I was expecting. I think my sublime text is broken or If is there any settings or something I shall suppose to change to fix this issue?
Here's the code:
first_name = input("Enter your first name? ")
last_name = input ("Enter your last name? ")
full_name = f'{first_name} {last_name}'
print (f'Hello,{full_name.title()}!')
The Problem with running the code on sublime is it's not asking for second user input?
Note: I'm at beginner level learner and non native English speaker so I apologies if I'm unable to explain the problem properly.
Sublime Text does not directly support receiving user input in programs. Sublime Text is not broken!
You can, however, install
SublimeREPL
viaPackage Control
on Sublime, which allows you to run an interpreter directly inside Sublime, which would let you provide user input.I also use Sublime for most of my code. However, when it comes to interactive code, I recommend either using your terminal / command prompt (my first choice) or iPython (which can also be run on your terminal).
I hope this helps. Please let me know if there are any questions!