0
Why does my for() function turns my list into integers?
hello = [1,2,3,4] for hi in hello: print(hi) Output: 1 2 3 4
3 Respostas
+ 1
Interesting question
hello here is a variable storing an integer array of 1, 2, 3, 4;
if you're expecting your output to be:
h
e
l
l
0
then consider this
for hi in "hello":
print(hi)
0
@Fabala Dibbasey i want the output to be [1,2,3,4]
same as the variable hello
0
print(hello)
Will do it