Premium Only Content
This video is only available to Rumble Premium subscribers. Subscribe to
enjoy exclusive content and ad-free viewing.
Opening and Writing Text to a Text File |Section 5|Celestial Warrior
1 year ago
1
Please write some code thatcreates a text file and writesthe items oflist numbers = [1, 2, 3]to that text file.
The text file content should look like following:
1
2
3
Note that the write() method takes only string datatypes so you may need to convert integers to strings in order to be able to write them in a file.
numbers = [1, 2, 3]
file = open("numbers.txt", "w")
for i in numbers:
file.write(str(i) + "\n")
file.close()
Loading comments...
-
17:53
foyo Games
1 year agoShadow Era | Shadow Warrior Opening
4 -
LIVE
Edge of Wonder
4 hours agoWho Are the Men in Black? The CIA Connection
153 watching -
45:17
The Officer Tatum
5 hours agoLIVE: Scott Jennings INCINERATES CNN, DNC Union BEGS For Money, + MORE | OT Show EP 15
55.6K45 -
14:45
Tundra Tactical
2 hours agoFirst Impression of the Labradar LX Chronograph.
55 -
LIVE
LFA TV
21 hours agoAnti-Trump Lawfare Has Failed | Trumpet Daily 11.26.24 7PM EST
524 watching -
29:44
Standpoint with Gabe Groisman
8 hours agoEP. 59. The State of Western Militaries Today. Col. Richard Kemp
25.6K1 -
47:24
Candace Show Podcast
3 hours agoConor McGregor: GUILTY—But Of What? | Candace Ep 111
92.3K179 -
13:19
Josh Pate's College Football Show
4 hours agoThe SEC has COLLAPSED!! Updated CFP Picture with Josh Pate
1.05K1 -
45:59
PMG
19 hours ago"Hannah Faulkner and Sabrina Cardone | Empowering the Next Generation"
7801 -
1:19:57
Awaken With JP
8 hours agoThanksgiving for America Special - LIES Ep 67
104K43