Hi , I am beginner at python and programming. I have been doing some exercises about counting average from txt file.
txt file data is like this.
1 : 4.25
2 : 3.97
3 : 1.45
4 : 2.33
python code is like this.
name = []
for line in open("fileData. txt").readlines ():
name.append(lin e.strip().split (':')[1])
name = map(float,name)
...
User Profile
Collapse
-
How does this code works?
-
write array into txt python
hello , i am waay new to python and programming.I'm trying to write program that stores username and password in txt but I don't seem to get what my problem is.
userName=str(ra w_input ("Username :"))
passWord=str(ra w_input("passwo rd : "))
stuData={}
stuData[userName ]=[passWord]
print stuData
f=open("student .txt","a")
...
No activity results to display
Show More