4 Topics

Member Avatar for
Member Avatar for Fatima_110

Hi, So for an assignment i had to read input from a file and then output it. The information in the file was in the following format: 1 line with a stock symbol and the next line with the quantiti bought. eg of a file that we'd use .ab 15 …

Member Avatar for Fatima_110
0
194
Member Avatar for deadsolo

Hi, I am currently working on a script that will compare two numbers from a file. I am thinking that I need to use a regular expression in order to get the numbers, however I don't know what the regex would be since there are multiple numbers through out the …

Member Avatar for deadsolo
0
293
Member Avatar for bellarc

I am attempting to remove instances of a character from a txt file with python using the following code: [CODE]import fileinput for line in fileinput.FileInput("test.txt",inplace=1): line = line.replace("^M","") print line[/CODE] and get the following error: File "par.py", line 6 line = line.replace(" ^ SyntaxError: EOL while scanning string literal I …

Member Avatar for woooee
0
325
Member Avatar for TrustyTony

Learned about hook functions [URL="http://www.daniweb.com/software-development/python/threads/383164/1650339#post1650339"]for a thread[/URL] having problem with bad user input from the documentation. This is result which skips bad inputs.

Member Avatar for TrustyTony
0
943

The End.