Your original text is stored in file: before.txt and result is in: after.txt
Code: Select all
before = 'before.txt'
after = 'after.txt'
new_file = []
with open(before, 'r') as rf:
with open(after, 'w') as wf:
for line in rf:
elements = line.split(' ')
for each in elements:
if 'http' in each:
print(each)
new_file.append(each)
wf.write(each)
Code: Select all
(https://en.wikipedia.org/wiki/32-bit)
(https://antixlinux.com/)
(http://en.wikipedia.org/wiki/Physical_Address_Extension)
(https://en.wikipedia.org/wiki/64-bit_computing)
platforms.http://www.ascendercorp.com/http://www.ascendercorp.com/typedesigners.htmlLicensed1.1http://scripts.sil.org/OFL
platforms.http://www.ascendercorp.com/http://www.ascendercorp.com/typedesigners.htmlLicensed1.1http://scripts.sil.org/OFL
platforms.http://www.ascendercorp.com/http://www.ascendercorp.com/typedesigners.htmlLicensed1.1http://scripts.sil.org/OFL
platforms.http://www.ascendercorp.com/http://www.ascendercorp.com/typedesigners.htmlLicensed1.1http://scripts.sil.org/OFL
platforms.http://www.ascendercorp.com/http://www.ascendercorp.com/typedesigners.htmlLicensed1.1http://scripts.sil.org/OFL
platforms.http://www.ascendercorp.com/http://www.ascendercorp.com/typedesigners.htmlLicensed1.1http://scripts.sil.org/OFL
platforms.http://www.ascendercorp.com/http://www.ascendercorp.com/typedesigners.htmlLicensed1.1http://scripts.sil.org/OFL
platforms.http://www.ascendercorp.com/http://www.ascendercorp.com/typedesigners.htmlLicensed1.1http://scripts.sil.org/OFL
(https://www.techsupportalert.com/content/32-bit-and-64-bit-explained.htm)
(https://support.apple.com/en-us/HT201948)
(https://support.microsoft.com/en-us/kb/827218)
(https://mxlinux.org/download-links)
(https://mxlinux.org/create-mx-live-usb-windows-using-mx-monthly-snapshot-iso)
(http://www.mxlinux.org/download-links)
(http://en.wikipedia.org/wiki/ISO_9660)
(https://mxlinux.org/videos/torrent)
(https://mxlinux.org/download-links)
(http://en.wikipedia.org/wiki/BitTorrent)
(https://mxlinux.org/wiki/system/iso-download-mirrors)
(https://mxlinux.org/download-links)
(https://en.wikipedia.org/wiki/SHA-2)
(http://www.winmd5.com/)
(https://mxlinux.org/wiki/system/dd-command)
(https://rufus.akeo.ie/)
(https://mxlinux.org/wiki/system/signed-iso-files)
(http://forums.debian.net/)
(https://wiki.debian.org/InstallingDebianOn/Apple)
(http://www.nirsoft.net/utils/product_cd_key_viewer.html)
(http://mxlinux.org/wiki/help-files/help-disk-manager)
(https://www.youtube.com/watch?v=khg6_sdrOBQ)
(https://www.youtube.com/watch?v=lf8eXhCKghg)
(http://gparted.org/display-doc.php?name=help-manual)
(https://en.wikipedia.org/wiki/Universally_unique_identifier)
(http://www.plop.at/)
(https://mxlinux.org/wiki/system/boot-parameters)
(https://mxlinux.org/wiki/system/uefi)
(https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface)
(https://mxlinux.org/uefi-boot-issues-and-some-settings-check)
(https://www.mxlinux.org/user_manual_mx15/MX_bootloader.html)
(https://www.mxlinux.org/wiki/system/uefi)
(http://en.wikipedia.org/wiki/Linux_startup_process)
(https://mxlinux.org/wiki/system/boot-parameters)
(http://docs.xfce.org/xfce/getting-started)
(https://mxlinux.org/node/177)
(http://gottcode.org/xfce4-whiskermenu-plugin)
(https://wiki.xfce.org/faq)
(http://www.xfce.org/about)
(https://mxlinux.org/my-home-folder-setup-and-disk-manager)
(https://mxlinux.org/mx-linux-17-mx-17-installation-overview-oracle-virtualbox-2017)
(https://mxlinux.org/wiki/system/hibernate)
(https://en.wikipedia.org/wiki/S.M.A.R.T.)
(https://mxlinux.org/wiki/help-files/help-disk-manager)
(https://mxlinux.org/wiki/system/boot-parameters)
(https://mxlinux.org/wiki/system/gnome-keyring)