Обсуждения
Which one is true:
4 голосов
6 ответовWhile true: statememts
0 голосов
2 ответовIf not true: print("false")
0 голосов
1 ответprint( 1==1 or 2==3) True: Really?
0 голосов
5 ответовwhy do we use
while True:
1 голос
3 ответовwhy python give this output ?
-3 голосов
12 ответовpairs = {1: "apple",
"orange": [2, 3, 4],
True: False,
None: "True",
}
print(pairs.get("orange"))
print(pairs.get(1))
print(pairs.get(12345, "not in dictionary"))
the output is
[2, 3, 4]
False
not in dictionary
why is print(pairs.get(13345,"not in dictionary")) giving the output not in dictionary.pls I nid explanation
2 голосов
4 ответовIn the continue Loop -
i = 0
while True:
i = i +1
if i == 2:
print("Skipping 2")
continue
if i == 5:
print("Breaking")
break
print(i)
print("Finished")
It shows the output being
"1
Skipping 2
3
4
Breaking
Finished"
Why are the last three lines not
"Breaking
5
Finished"
Where it shows print(i) after break?
1 голос
3 ответовАктуальное сегодня
Someone can help me
2 Votes
What's wrong with this?
2 Votes
HTML community, HELP!!
2 Votes
X velocity
0 Votes
Files not linking in C++
0 Votes
I am a super beginner
0 Votes
Web Dev
0 Votes
Pls give me an idea
1 Votes