Skip to content
Advertisement

Tag: for-loop

increase the value of x by 1 [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 4 months ago. Improve this question

I am stuck with this for loop problem in python [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 months ago. Improve this question I am trying to make a a program to calculate the probability of a game. So the game is like the roulette but it has

How to create new list of lists using for loop

I have two lists like I want to extract the required elements 1 and 3 from each list contained in values, to create a new list of lists like [[‘1234’, 50], [‘5678’, 100]]. I was able to solve the problem with a list comprehension: But how can I write the equivalent with explicit for loops? I tried: but the resulting

Looping through HTML & following links

I am writing a code that is supposed to open a url, identify the 3rd link and repeat this process 3 times (each time with the new url). I wrote a loop (below), but it seems to each time sart over with the original url. Can someone help me fix my code? Answer You need to define the empty list

Advertisement