its combined log format -
127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "http://www.example.com/start.html" "Mozilla/4.08 [en] (Win98; I ;Nav)"
User Profile
Collapse
-
-
Print all entries with status codes in the 200's
can anyone tell me how to print out the ip address and timestamp from a weblog file for all the entries where the status code begins with 2. -
sorry i dont understand. I'm new to programming. What do i need to do to fix it?Leave a comment:
-
'str' object has no attribute 'append'
...Code:cars = ['honda' , 'ford' , 'kia' , 'toyota' , 'jaguar' , 'daimler' , 'citroen' , 'peugeot' , 'skoda'] # Print the longest and the shortest words in the gunners list shortest=[] longest=[] shortest=[] for i in cars: if len(i) > len(longest): longest = i print longest for i in cars: shortest = cars[0] if len(i) < len(shortest): shortest = [
Last edited by bvdet; Feb 22 '15, 03:28 PM. Reason: Please use code tags when posting code [code]....[/code]
No activity results to display
Show More
Leave a comment: