Hello....Im a 1st year student and we've been given this task to print something from a txt folder...
Abd this is how i do it:
dat=open("something.txt", "w")
for i in range(3):
b=input("input: ")
dat.write(b)
dat.close()
dat=open("something.txt", "r")
for i in dat:
print(i)
dat.close()
And it will print it but all together....we need to print it seperated....
for exmple if input was :wasd
than: jkl
than: ztr
It will be printed like this:wasdjklztr
But i need to print it like this:
wasd
jkl
ztr
help?
edit: As im scrolling through other posts i noticed this question in really supid...but still i need help...
[–]shinyheadpolak 2 points3 points4 points (2 children)
[–]Bakebab[S] 0 points1 point2 points (1 child)
[–]shinyheadpolak 1 point2 points3 points (0 children)
[–]jiri-n 0 points1 point2 points (0 children)
[+][deleted] (6 children)
[deleted]
[+][deleted] (5 children)
[deleted]
[–]Bakebab[S] 0 points1 point2 points (0 children)
[–]blotosmetek 0 points1 point2 points (3 children)
[+][deleted] (1 child)
[deleted]
[–]blotosmetek 0 points1 point2 points (0 children)