I am getting an error when I try and run split and count I seem to get it to
work with one or the other but not together. python wants a character buffer
but I am not sure how to use it.
I would also like to use readline to check and see if several numbers are in
the same line but I think I will need to use it in a loop maybe for? So it
would check for the first then check for the second if both are true add to
count but if ether are false continue to next line and repeat.
If anyone can help me that would be grate.
Thanks
look_in = "keno_back_up.txt"#raw_input ("Enter the search file to look in ")
search = raw_input ("Enter your search item ").split
file = open(look_in, "r").read().count(search)
print "Your search came",file ,"times"
Traceback (most recent call last):
File "C:\Python26\keno program\get rid of 4", line 4, in <module>
file = open(look_in, "r").read().count(search)
TypeError: expected a character buffer object
_________________________________________________________________
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor