Importing data in python - Reading Plain Text File

preview_player
Показать описание
Visit complete course on Data Science with Python :
Рекомендации по теме
Комментарии
Автор

hi, i want to use content in a text file as input for my main script. can you please point to me an example code for the same. For example in the text file A= 10, B=15 and in my main script i need to use 10 & 15 as inputs for my script.

abinashnayak
Автор

sir how to extract columns from given text file in python ?

civilengineeringandprogram
Автор

what if the file has other language script. because it says unreadable file

hiwotwonago
Автор

I’m a new student and need help to do this project:
I have a port scanner script it works properly, it works in Pycharm using python3.9.
I have to make a file and I did make call (Example.txt)
On this file, I have to do this:
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.
I’m not asking for you to do the project for me, I'm only asking ware I need to work or used in my script to accomplish this because it is my first time doing this and working with python too, and I have been struggling with this part one very bad. I can even send you the code, so you can look and only tell me what I’m doing bad, is not working.

rafy-ivanmorales
Автор

getting encoding error when I use file = open ('text.txt', r)

chrismartincm
Автор

can i use notepad for txt file if i am using windows

AshishSingh-wuii