Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Create and Write in file ( in Python )
elena1234
Feb 10th, 2022
(
edited
)
165
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Python
0.19 KB
| None
|
0
0
raw
download
clone
embed
print
report
with
open
(
"new_test.txt"
,
mode
=
"w"
)
as
file
:
file
.
write
(
"New Line
\n
"
)
with
open
(
"new_test.txt"
,
mode
=
"a"
)
as
file
:
file
.
write
(
"Second Line
\n
"
)
file
.
write
(
"Third Line
\n
"
)
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
JavaScript | 34 min ago | 2.87 KB
XHyakumeX
Lua | 40 min ago | 3.32 KB
Your Bitcoin Wallet Credentials have been res...
GetText | 56 min ago | 0.26 KB
"Interactive Game" rev_02
Arduino | 1 hour ago | 5.51 KB
**Game Interface** rev_01
Arduino | 1 hour ago | 5.51 KB
PHP OOP
PHP | 1 hour ago | 6.73 KB
BatalhaNavalSimplificada
Java | 2 hours ago | 5.42 KB
BatalhaNaval
Java | 2 hours ago | 6.00 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!