I want to loop from 100 to 0, how do I do it?
for i in range (100,0) #this is not working
You can make use of negative indices to start from back:
for i in range(100):
k = 100 - i
Or You can use:
for i in reversed(range(101)):
Both will give same output that is 100 to 0
Operator ^ is a bitwise operator, which does "bitwise exclusive or".
The ...READ MORE
Hi, it is pretty simple, to be ...READ MORE
$ to match the end of the ...READ MORE
down voteacceptedFor windows:
you could use winsound.SND_ASYNC to play them ...READ MORE
if you google it you can find. ...READ MORE
colors = ['red', 'green', ...READ MORE
can you give an example using a ...READ MORE
You can simply the built-in function in ...READ MORE
Reversing a list is a commonly used ...READ MORE
You can use sleep() method to sleep ...READ MORE
Already have an account? Sign in.