0

Let's take this:

f = open ('myflie.txt', 'w')
f.write ('12345');

I always get the length of the output printed on the console.
Is there any way to prevent it from printing it?

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by n.utiu
0

There must be something else in your program. In principle, these 2 lines don't send anything to the console.

Edited by Gribouillis: n/a

1

You are using the Python shell.

>>> f = open ('myflie.txt', 'w')
>>> f.write ('12345')
5

The Python shell is for testing of short code ideas. Use the editor to write programs.

Edited by bumsfeld: n/a

0

You are using the Python shell.

>>> f = open ('myflie.txt', 'w')
>>> f.write ('12345')
5

The Python shell is for testing of short code ideas. Use the editor to write programs.

Well that solved the problem. ;)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.