Pycharm Python Console Not Printing The Output
I have a function that I call from Pycharm python console, but no output is shown. In[2]: def problem1_6(): ...: for i in range(1, 101, 2): ...: print(i, end = ' ')
Solution 1:
This will working:
def problem1_6():
for i in range(1, 101, 2):
sys.stdout.write(str(i) + ' ')
sys.stdout.flush()
or:
defproblem1_6():
for i inrange(1, 101, 2):
print(i, end=' ', flush=True)
Post a Comment for "Pycharm Python Console Not Printing The Output"