Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #18.7K
Ranked #2K
~4K People Reached
Favorite Forums

9 Posted Topics

Member Avatar for knan

temp=1 main_list = [['a', 'b', 'c', 'd'], ['e', 'f'], ['g', 'h']] for each_list in main_list: for ctr in range(len(each_list) - 1): temp=ctr +1 while temp < len(each_list) : print each_list[ctr],"-", each_list[temp ] temp = temp + 1;

Member Avatar for Gribouillis
0
166
Member Avatar for keeda

try by adding all these option step 1: first know where is shell interpreter by type in command prompt [B][B]which bash[/B][/B] (which is command ) is show the you interpreter step 2: add #! /step 1 output at the first line step 3: after save and exit from script execute …

Member Avatar for griswolf
0
166
Member Avatar for jmark13

#!/usr/bin/env python def makebinary(number): temp=long(number) mask=1 k=0 for i in xrange(64): mask= 1 << (64 - (i+1)) k= temp & mask if k == 0: print int("0"), else: print int("1"), a='010101010101010101010101010101010101010101010101010101010101' a=int(a,2) print a #makebinary(4) makebinary(a)

Member Avatar for jmark13
0
924
Member Avatar for xsach

example file name=a.txt tac a.txt(it will print reverse order tac is command reverse of cat)

Member Avatar for utpalendu
0
114
Member Avatar for Steven.T

This file name is usrinput.py #! /usr/bin/env python import sys import os This file name is allfunction.py #! /usr/bin/env python import os import string def readfile(filename): try: fd=open(filename,'r') try: for eachline in fd.readlines(): # delete all lis=string.strip(eachline) lis=lis.split() #print lis for eachword in lis: print eachword lower(eachword) #print lis[eachword] #print …

Member Avatar for TrustyTony
0
1K
Member Avatar for jacob07

try this #!/usr/bin/env python import re def filter(file_input,file_out): fin=open(file_input,'r') fout=open(file_out,'w') for eachline in fin: #print eachline if re.match('^FF',eachline): #print eachline[2:] eachline.rstrip(" \n ") list=eachline.split(" ") print list[0],list[2],list[3] make=str(list[0])[2:] + "-- " + str(list[2]) + " -- "+ str(list[3]) #print make fout.write(make) else: #print "line=" + eachline eachline.rstrip("\n ") listano=eachline.split(" ") …

Member Avatar for jcao219
0
240
Member Avatar for d.devendran
Member Avatar for jcao219
0
191
Member Avatar for DayneD89

I am not understand properly your problem but dynamically u can find out the list length let try this l=[1,2,3,4] i=0 for each in l: print l[i] i+=1 here value of i=no. of elements in the list

Member Avatar for vegaseat
0
178
Member Avatar for nuB

debug the code then only come to know the actual problem.I g++ complier compile the following command g++ -g -o outputfilename programname then execute gdb ./outputfilename and then execute b main then press r (4 run ) and then press s ( 4 setp by step ) for print use …

Member Avatar for nuB
1
418

The End.