I’m new to python and i can’t figure out how to write a reverse for loop in python.
e.g. the python equivalent to the C lang loop
for (i = 10; i >= 0; --i) {
printf ("%d\n", i);
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use python range method.
for loop in
pythonequavalent toCwill be: