[英]How do I print only the date from this line using Python in BeautifulSoup?
<td colspan="6" style="background-color: #fff;text-align: center;font-weight:bold;">Draw Date: 2019-01-15</td>
How do I print only the 2019-01-15
part?如何仅打印
2019-01-15
部分? This value is stored in the date
variable.该值存储在
date
变量中。
date.string.split()[-1]
#'2019-01-15'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.