tags:

views:

32

answers:

1

In C/C++:

for(int i=0;i<=5;i++)

In Python:

for i in range(0,5)

Question is:

s=[1,2,3,4,1]

for i in s:
    for j in s:

Here i wanna make second for loop j=1 (j value should be start with 1 like this s[1]=2).How do i pass that value.

+1  A: 

You should ask this on stackoverflow, but the answer is (if I got you right):

for i in s:
   for j in s[1:]:

Read this chapter about lists in python, this will help you.

Felix Kling
Thanks.. Mr.Felix
If the solution helps you, select the checkmark beside this answer.
Felix Kling