Writing Data to a Text File in Python

preview_player
Показать описание


Writing data to a file is an import process. Often we read data from one or more files and process and need to write to another file, or in taking input from an end user.

In this video we look at how to take both text and numbers and convert it to text so that it can be written to a file in Python.
Рекомендации по теме
Комментарии
Автор

bro i am working on a project you helped a lot
thanks brother .
love from india

cordial_cyborg
Автор

Rafy-Ivan Morales
0 seconds ago
I'm a new student trying to learn, so I can become a programmer with python and I have a project on how to make a port scan.

So far I already make a port scan with Python3, and it scans fine, give a date and everything working good so far.

I see on your video tutorial you give example on how to send and receiving data.

I would like to ask for your advice if you can and guide me on how I will add this 3
in a Python script, I have:

2. System should look for all the ports between the range of 1 to 1025
3. If the Ports is open, it should create a file and add an entry for port number
4. In case of any exception for instance “host is not available”, “host name could not be resolved” or
due to any other error, you need to write that exception into the same file.


Thank you and Merry Christmas.

rafy-ivanmorales
Автор

Bro Thank you so much!!!
I loved this! I wanted a way to send data from the users! and This litterally worked! :D
Love from the Philippines <3<3<3

goldenmasked
Автор

How about reading data from a dataset and writing the results to a file

cosmaskiplangat
Автор

Hi, is it possible to have the output printed in the terminal and recorded in the text file at the same time?

lordpigster
Автор

It might be a REAL GOOD IDEA to post the code

escapefelicity
Автор

how to do the sme in opposite like how to write a sentce in notepad using python please make a vedio on this

vinayjangam
Автор

Hi i got a problem. My program just overwrittes the old text BUT WHY????

zerskill
Автор

Hello could you please tell me what the error “can only concatenation list (not “str”) to list” in Python means?

Thank you for the video :)

someonebla
Автор

don't like the font you are using

sifabaseka
Автор

Rafy-Ivan Morales
0 seconds ago
I'm a new student trying to learn, so I can become a programmer with python and I have a project on how to make a port scan.

So far I already make a port scan with Python3, and it scans fine, give a date and everything working good so far.

I see on your video tutorial you give example on how to send and receiving data.

I would like to ask for your advice if you can and guide me on how I will add this 3
in a Python script, I have:

2. System should look for all the ports between the range of 1 to 1025
3. If the Ports is open, it should create a file and add an entry for port number
4. In case of any exception for instance “host is not available”, “host name could not be resolved” or
due to any other error, you need to write that exception into the same file.


Thank you and Merry Christmas.

rafy-ivanmorales