Re: [Tutor] change the position and updated

2017-04-27 Thread Peter Otten
Peter Otten wrote: > Sarika Shrivastava wrote: > >> Input : >> c=[(12,45),(1234,567),(12345,0),(678,123456)] >> >> #o/p==1425 >> #o/p==1526374 >> #0/p==102345 >> #o/p===617283456 > If that's not enough to get a working solution you may come back here once > you have some code. OK, won't happ

Re: [Tutor] change the position and updated

2017-04-26 Thread Sarika Shrivastava
Thanks you Neeraj giving the solution of problem I was trying as but not able to find right solution Thanks to others also for giving a nice advice On Wed, Apr 26, 2017 at 4:36 AM, Neeraj Sharma wrote: > c = [(12, 45), (1234, 567), (12345, 0), (678, 123456)] > > max_length = 0 > for key,value

Re: [Tutor] change the position and updated

2017-04-26 Thread Neeraj Sharma
c = [(12, 45), (1234, 567), (12345, 0), (678, 123456)] max_length = 0 for key,value in c: list1 = [] list2 = [] for i in str(key): list1.append(i) for j in str(value): list2.append(j) if (len(list1)>len(list2)): max_length = len(list1) else:

Re: [Tutor] change the position and updated

2017-04-26 Thread Neeraj Sharma
Hi, Find the code below c = [(12, 45), (1234, 567), (12345, 0), (678, 123456)] max_length = 0 for key,value in c: list1 = [] list2 = [] for i in str(key): list1.append(i) for j in str(value): list2.append(j) if (len(list1)>len(list2)): max_lengt

Re: [Tutor] change the position and updated

2017-04-26 Thread Peter Otten
Sarika Shrivastava wrote: > Input : > c=[(12,45),(1234,567),(12345,0),(678,123456)] > > #o/p==1425 > #o/p==1526374 > #0/p==102345 > #o/p===617283456 > > Question explanation: > > in list c we have some tuples so I need to take tuple value one by one and > change the position of value like wise

[Tutor] change the position and updated

2017-04-26 Thread Sarika Shrivastava
Input : c=[(12,45),(1234,567),(12345,0),(678,123456)] #o/p==1425 #o/p==1526374 #0/p==102345 #o/p===617283456 Question explanation: in list c we have some tuples so I need to take tuple value one by one and change the position of value like wise first tuple value (12 ,45) then then 1 we pick u