Is it possible to iterate a list in the following way in Python (treat this code as pseudocode)?
a = [5, 7, 11, 4, 5]
for v, w in a:
print [v, w]
And it should produce
[5, 7]
[7, 11]
[11, 4]
[4, 5]
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.
From the
itertoolsrecipes: