python - Split string confusion -
i need split string:
example:
str = 'mink.microctr.fit.edu - - [21/jun/2000:20:21:36 -0400] "get / http/1.1" 200 1786'
from above string need extract "21/jun/2000"
.
using:
str.rstrip().split()[3]
the output "[21/jun/2000"
.
any on how go this?
str.split()[3][1:].split(':')[0]
Comments
Post a Comment