0
Syntaxly is correct but it will not undergo for loop
Need a exact description
16 Respostas
+ 1
Maybe ur trying to print something that you didn't even define
Try this to print hi
y = "hi"
for x in y:
print (x)
0
for value in " ":
print("Hi")
0
Well, the string " " only contains one character, (a space). As such, your loop goes around once only. Is this your doubt or is there something else?
0
It will not undergo for loop
0
Hey you already said that undergo thing in the title. And I'm still not getting what you mean.
I checked that code and it works, in case you wonder.
0
Its prints hi ??
0
It prints nothing
0
It prints "Hi"
One time ...
0
No way. I have checked it more than 10 times.check the indentations also
0
What you saying that I'm lying?
Copy the first comment above, paste in Code Playground and run
You'll see I'm not telling lie ...
0
I can't share screenshot here that's problem
0
Anyway thanks!!
0
Ok no problem ...
0
I don't leave space in between those ""
0
Look again in your first comment above ...
for value in " ": # <- one space string
print("Hi")
0
Read my question again web sad