Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/343.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 以下哪种方式是获取文本数据的最佳方式_Python_Python 2.7 - Fatal编程技术网

Python 以下哪种方式是获取文本数据的最佳方式

Python 以下哪种方式是获取文本数据的最佳方式,python,python-2.7,Python,Python 2.7,没有模块xml或lxml, 带模块re 或者换一种方式, 如何最好地获取引号之间的数据: 我对re的选择: found=re.findall(r'my option with re:found=re.findall(r'欢迎使用SO!您有什么理由不能使用lxml吗?请发布您的代码和您获得的输出,以便我们可以看到您尝试了什么。我只能使用组织中允许的模块。我无权获取lxml。输出:[如果您想通过regex找到解决方案,我建议您使用以下网站,在该网站上您可以跳过文本并尝试多个regex搜索。

没有模块xml或lxml, 带模块re 或者换一种方式, 如何最好地获取引号之间的数据:

我对re的选择:
found=re.findall(r'my option with re:found=re.findall(r'欢迎使用SO!您有什么理由不能使用lxml吗?请发布您的代码和您获得的输出,以便我们可以看到您尝试了什么。我只能使用组织中允许的模块。我无权获取lxml。输出:[如果您想通过regex找到解决方案,我建议您使用以下网站,在该网站上您可以跳过文本并尝试多个regex搜索。