Python Programming 20. Write To a Text File

Computer Science Lessons November 21, 2022
Video Thumbnail
Computer Science Lessons Logo

Computer Science Lessons

View Channel

About

Perhaps your at university studying for a degree mathematics, science or engineering. Perhaps you're studying for an Advanced Level or GCSE qualification in computer science. You may even be a working professional already, and looking for ways to top up your computing knowledge and skills. Whatever your needs, new learning or revision, Computer Science Lessons can help. Computer Science Lessons includes videos on a wide range of topics including hardware architecture, databases, data science, communications, web technologies, cryptography, cryptocurrency, cybersecurity, computer graphics, data structures, Boolean logic, artificial intelligence, quantum computing, computer related legislation, and much more. Computer science lessons also includes several coding courses. Whether you're an absolute beginner, intermediate or advanced, you can find programming tutorials in languages such as Python, VB.NET, C#, SQL, HTML, CSS, and JavaScript.

You May Also Like

Boost Your Python Projects

AI-recommended products based on this video

Loading...
USB Stick 64GB, Aiibe 64GB USB Flash Drive 64GB USB 2.0 Memory Stick Thumb Drive Data Storage Jump Drive for Laptop(64G, Green)

USB Stick 64GB, Aiibe 64GB USB Flash Drive 64GB USB 2.0 Memory Stick Thumb Drive Data Storage Jump Drive for Laptop(64G, Green)

(593)
$9.99
Prime
500+ bought in past month
Loading...
RAOYI 5Pack 64GB USB Flash Drive USB Stick USB 2.0 Memory Stick Slide Retractable Thumb Drive 64G USB Drive USB Key for Data Storage (Black Red Blue Green Purple)

RAOYI 5Pack 64GB USB Flash Drive USB Stick USB 2.0 Memory Stick Slide Retractable Thumb Drive 64G USB Drive USB Key for Data Storage (Black Red Blue Green Purple)

(4,402)
$26.09
Prime
1K+ bought in past month
Loading...
KEXIN 64GB USB Flash Drive 3 Pack - Swivel Thumb Drives with LED Indicator, High-Speed USB 2.0 (Pink/Yellow/Cyan) for Data Storage, Bulk Pen Drives Multi-Color Pack

KEXIN 64GB USB Flash Drive 3 Pack - Swivel Thumb Drives with LED Indicator, High-Speed USB 2.0 (Pink/Yellow/Cyan) for Data Storage, Bulk Pen Drives Multi-Color Pack

(1,558)
$17.75
Prime
100+ bought in past month
Loading...
SanDisk Ultra Flair USB 3.0 64GB Flash Drive High Performance up to 150MB/s (SDCZ73-064G-G46)

SanDisk Ultra Flair USB 3.0 64GB Flash Drive High Performance up to 150MB/s (SDCZ73-064G-G46)

(191,288)
$12.53$11.33
FREE delivery Sun, Aug 10 on your first order
1K+ bought in past month
Loading...
SAMSUNG 870 EVO SATA SSD 500GB 2.5” Internal Solid State Drive, Upgrade PC or Laptop Memory and Storage for IT Pros, Creators, Everyday Users, MZ-77E500B/AM [Canada Version]

SAMSUNG 870 EVO SATA SSD 500GB 2.5” Internal Solid State Drive, Upgrade PC or Laptop Memory and Storage for IT Pros, Creators, Everyday Users, MZ-77E500B/AM [Canada Version]

(41,678)
$74.97
FREE delivery Wed, Jun 18
400+ bought in past month
Loading...
SAMSUNG 870 EVO SATA III SSD 4TB 2.5” Internal Solid State Drive, Upgrade PC or Laptop Memory and Storage for IT Pros, Creators, Everyday Users, MZ-77E4T0B/AM [Canada Version]

SAMSUNG 870 EVO SATA III SSD 4TB 2.5” Internal Solid State Drive, Upgrade PC or Laptop Memory and Storage for IT Pros, Creators, Everyday Users, MZ-77E4T0B/AM [Canada Version]

(41,656)
$399.97
FREE delivery Tue, Jun 17
100+ bought in past month
Loading...
Samsung 990 EVO Plus - 4TB PCIe Gen4. X4, Gen5. X2 NVMe 2.0 - M.2 Internal SSD, Speed Up to 7,250 MBs, Upgrade Storage for PC-Laptops, HMB Technology and Intelligent Turbowrite (MZ-V9S4T0B/AM)

Samsung 990 EVO Plus - 4TB PCIe Gen4. X4, Gen5. X2 NVMe 2.0 - M.2 Internal SSD, Speed Up to 7,250 MBs, Upgrade Storage for PC-Laptops, HMB Technology and Intelligent Turbowrite (MZ-V9S4T0B/AM)

(1,811)
$359.99$341.99
FREE delivery Tue, Jun 17
100+ bought in past month
Loading...
SAMSUNG EVO Select Micro SD-Memory-Card + Adapter, 128GB microSDXC 160MB/s Full HD & 4K UHD, UHS-I, U3, A2, V30, for Android Smartphones, Tablets, Nintendo-Switch (MB-ME128SA/AM) [Canada Version]

SAMSUNG EVO Select Micro SD-Memory-Card + Adapter, 128GB microSDXC 160MB/s Full HD & 4K UHD, UHS-I, U3, A2, V30, for Android Smartphones, Tablets, Nintendo-Switch (MB-ME128SA/AM) [Canada Version]

(12,472)
$19.99$18.59
FREE delivery Sun, Aug 10 on your first order
400+ bought in past month
Loading...
Anker USB C Cable, [2-Pack, 6 ft] Type C Charger Premium Nylon USB Cable, USB A to Type C Charging Cable Fast Charge for Samsung Galaxy S10 S10+ / Note 8, LG V20 and Other USB C Charger (Black)

Anker USB C Cable, [2-Pack, 6 ft] Type C Charger Premium Nylon USB Cable, USB A to Type C Charging Cable Fast Charge for Samsung Galaxy S10 S10+ / Note 8, LG V20 and Other USB C Charger (Black)

(103,365)
$13.49
5K+ bought in past month
Loading...
Anker USB C Charger Cable (6ft 100W, 2Pack), USB 2.0 Type C Fast Charging Cable for iPhone 15 / 15Pro / 15Plus / 15ProMax MacBook Pro 2020, iPad Pro 2020, iPad Air 4, Samsung Galaxy S23+/S23 Ultra ClimatePartner certified

Anker USB C Charger Cable (6ft 100W, 2Pack), USB 2.0 Type C Fast Charging Cable for iPhone 15 / 15Pro / 15Plus / 15ProMax MacBook Pro 2020, iPad Pro 2020, iPad Air 4, Samsung Galaxy S23+/S23 Ultra ClimatePartner certified

(44,904)
$17.99
FREE delivery Wed, Aug 20 on your first order
6K+ bought in past month
Loading...
Logitech K250 Bluetooth Keyboard with Numpad, Easy Connectivity, Compact Wireless Keyboard Made with Recycled Plastic, Spill-Resistant, Comfortable Keys - Windows/MacOS - Graphite
Best Seller

Logitech K250 Bluetooth Keyboard with Numpad, Easy Connectivity, Compact Wireless Keyboard Made with Recycled Plastic, Spill-Resistant, Comfortable Keys - Windows/MacOS - Graphite

(49)
$19.99$18.59
FREE delivery Mon, Aug 18 on your first order
Loading...
Logitech K400 Plus Wireless Touch TV Keyboard With Easy Media Control and Built-in Touchpad, HTPC Keyboard for PC-connected TV, Windows, Android, Chrome OS, Laptop, Tablet - Black
Best Seller

Logitech K400 Plus Wireless Touch TV Keyboard With Easy Media Control and Built-in Touchpad, HTPC Keyboard for PC-connected TV, Windows, Android, Chrome OS, Laptop, Tablet - Black

(38,516)
$39.98$35.98
FREE delivery Thu, Sep 4
500+ bought in past month
Loading...
Razer BlackShark V2 X Gaming Headset: 50mm Drivers - Cardioid Mic - Memory Foam Cushion - Lightweight- Comfortable, Noise Isolating Earcups - for PC, PS4, PS5, Switch - 3.5mm Audio Jack - Black ECOLOGO

Razer BlackShark V2 X Gaming Headset: 50mm Drivers - Cardioid Mic - Memory Foam Cushion - Lightweight- Comfortable, Noise Isolating Earcups - for PC, PS4, PS5, Switch - 3.5mm Audio Jack - Black ECOLOGO

(16,830)
$47.98$38.38
FREE delivery Sat, Nov 15
1K+ bought in past month
Loading...
Dell 24 Monitor - SE2425HM - 23.8-inch Full HD (1920x1080) 16:9 100Hz Display, IPS Panel, 16.70 Million Colors, Anti-Glare, 1 HDMI / 1 VGA Port, TÜV Rheinland 3-Star*, Comfortview Plus - Black

Dell 24 Monitor - SE2425HM - 23.8-inch Full HD (1920x1080) 16:9 100Hz Display, IPS Panel, 16.70 Million Colors, Anti-Glare, 1 HDMI / 1 VGA Port, TÜV Rheinland 3-Star*, Comfortview Plus - Black

(169)
$119.99$103.99
FREE delivery Tue, Oct 7
300+ bought in past month
Loading...
Dell S2425HS Monitor - 23.8 Inch, FHD (1920x1080) Display, 100Hz Refresh Rate 1500:1 Contrast Ratio, TÜV Rheinland Eye Comfort 4 Star, Integrated 2x5W Speaker, Height/Tilt/Swivel/Pivot - Ash White

Dell S2425HS Monitor - 23.8 Inch, FHD (1920x1080) Display, 100Hz Refresh Rate 1500:1 Contrast Ratio, TÜV Rheinland Eye Comfort 4 Star, Integrated 2x5W Speaker, Height/Tilt/Swivel/Pivot - Ash White

(15)
$139.99
FREE delivery Tue, Oct 7
300+ bought in past month
Loading...
USB C Docking Station Dual Monitor for Dell Hp,15-in-1 Laptop Docking Station 3 Monitors USB C Hub with Dual 4K HDMI,8K DP,Button,PD Charging,Ethernet,6 USB A&C,SD/TF, Audio USB-C Multiport Adapter

USB C Docking Station Dual Monitor for Dell Hp,15-in-1 Laptop Docking Station 3 Monitors USB C Hub with Dual 4K HDMI,8K DP,Button,PD Charging,Ethernet,6 USB A&C,SD/TF, Audio USB-C Multiport Adapter

(1,359)
$67.98
FREE delivery Sun, Aug 24
100+ bought in past month
Loading...
Dell 24 Monitor - P2425H EPEAT

Dell 24 Monitor - P2425H EPEAT

(57)
$239.99$189.05
FREE delivery Tue, Oct 7
50+ bought in past month
Loading...
Dell P2725H 27" Full HD 1920 x 1080 Monitor - 1 Year Warranty, Computer Monitor Screen Bundle with Power Cable + USB 3.0 Upstream Cable + Display Port Cable + HDMI Cable + Microfiber Cloth Included

Dell P2725H 27" Full HD 1920 x 1080 Monitor - 1 Year Warranty, Computer Monitor Screen Bundle with Power Cable + USB 3.0 Upstream Cable + Display Port Cable + HDMI Cable + Microfiber Cloth Included

(35)
$539.87$539.34
FREE delivery Oct 8 - 10
Loading...
Dell P2425H Computer Monitor Screen 24" 16:9 IPS Display 100Hz w/Stand - 1 Year Warranty, Full HD, 1920 x 1080 with Power Cord + DisplayPort Cable + HDMI Cable + USB 3.0 Cable + Microfiber Cloth

Dell P2425H Computer Monitor Screen 24" 16:9 IPS Display 100Hz w/Stand - 1 Year Warranty, Full HD, 1920 x 1080 with Power Cord + DisplayPort Cable + HDMI Cable + USB 3.0 Cable + Microfiber Cloth

(57)
$981.72
Loading...
Acer PM161Q Bbmiuux 15.6" Full HD (1920 x 1080) Widescreen Portable IPS Display | AMD FreeSync Technology | 4ms (G to G) | 2 Speakers | USB Type-C Cable and Mini HDMI Cable

Acer PM161Q Bbmiuux 15.6" Full HD (1920 x 1080) Widescreen Portable IPS Display | AMD FreeSync Technology | 4ms (G to G) | 2 Speakers | USB Type-C Cable and Mini HDMI Cable

(149)
$157.04$119.76
FREE delivery Mon, Aug 11
100+ bought in past month
Loading...
Acer EDA270U Pbmiipx 27" WQHD (2560 x 1440) 1500R Curved Widescreen Gaming Display | AMD FreeSync Premium | 1ms (VRB) | up to 170Hz Refresh | HDR 10 | 2 Speakers | Display Port and HDMI Cable Incl.
Amazon's Choice

Acer EDA270U Pbmiipx 27" WQHD (2560 x 1440) 1500R Curved Widescreen Gaming Display | AMD FreeSync Premium | 1ms (VRB) | up to 170Hz Refresh | HDR 10 | 2 Speakers | Display Port and HDMI Cable Incl.

(714)
199.96
PrimeFREE delivery Sunday, June 15.
200+ bought in past month
Loading...
Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

(382)
$94.95
PrimeFREE delivery Sat, Jun 14
Loading...
Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

(382)
$94.95
PrimeFREE delivery Sat, Jun 14
Loading...
10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

(1)
$99.99
FREE delivery Mon, Aug 11
Loading...
ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

(49)
$117.29$102.21
$6.86 delivery Thu, Aug 14
Loading...
7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

(61)
$68.99
FREE delivery Tue, Aug 12
Loading...
BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

(288)
$54.14
FREE delivery Sun, Jun 22