Reading from a file and writing to a different file. Any guide on how to initialise the read and write functions?
how to read to and write from a file
Collapse
X
-
If your input file contains this:
can you tell, what the expected output should be?Code:1 34 12 4 123
Because you are talking about 'product', and as far as my English goes, the product of 2 and 3 is (2x3=) 6
But i only see additions in your 'code-so far'...Comment
-
I asked a question, and i did not get an answer.....
Why do you think i asked that question?
Just so you could post your code again, without specifying what kind of error you have? and on what line the error is?
rule1: please use '[CODE]' tags around your code
rule2: only post code if its different from previous post ;)
rule3: answer a question when asked, how else can you be helped?
rule4: i do not make rules here........
But, to answer your question,.....
Your code gives an error, on what line, and what error?
It it's not this error, than please use '[CODE]' tags to post your code..... ;)Code:wordlist = line.split() ^ IndentationError: expected an indented blockComment
Comment