0
rated 0 times
[
0]
[
0]
/ answers: 1 / hits: 501
/ 2 Years ago, wed, february 2, 2022, 2:26:17
I am writing a program that takes the text written in a text document called datafile.txt, then prints what is in the file. The text that is in the file is is "Hello World", but the text that prints is "['Hello World']" How do i make it so the characters [, ], and ' do not appear.
file = open("datafile.txt", "r")
lines = file.readlines()
SaveDir = lines
print SaveDir
More From » python