saving . . . saved difference between open and loadtxt function in python has been deleted. difference between open and loadtxt function in python has been hidden .
difference between open and loadtxt function in python
Title
Question
what is the main difference between open and loadtxt function in python.
when to use load function and when to use open function in python.

Python-3.4.3 Getting-started-with-files 10-11 min 50-60 sec 07-05-21, 11:08 p.m. ukmaravinash

Answers:

open() is used to open the file. 
Whereas loadtxt() loads the data from the file to the assigned variable. 
When to use the respective function is depends on the usage.
05-06-21, 7:26 p.m. pravin1389


Opening a file allows you to read or write to it (depending on the flag you pass as the second argument), whereas reading it actually pulls the data from a file that is typcially saved into a variable for processing or printed as output. You do not always read from a file once it is opened by Dhivya Dharshini R
19-01-22, 1:05 p.m. dhivya.dd2002@gmail.com


Log-in to answer to this question.