I've created a few test programs to show what I mean
import os
r = open('in.txt', 'r')
for line in r.readlines():
print line
Above program prints every line in 'in.txt' which is what I want with the others
for line in raw_input():
print line
I input "asdf" and it gives me (it also does not let me input multiple lines)
a
s
d
f
Lastly,
for line in str(input()):
print line
I input "asdf" and it gives me (does not let me input multiple lines)
Traceback (most recent call last):
File "C:/Python27/test.py", line 1, in <module>
for line in str(input()):
File "<string>", line 1, in <module>
NameError: name 'asdf' is not defined
Can someone please tell me what is going on? What is the difference between these 3 input methods other than reading files and standard input?