This is actually a very basic issue i'm facing
# create list using append & idiom method to test process time
fln=open('CROSSWD.TXT')
def check_1(fln):
res=[]
for line in fln:
word=line.strip()
res.append(word) # just create a new list
return res
def check_2(fln):
res2=[]
for line in fln:
word2=line.strip()
res2+=[word2] # using another way
return res2
n=check_2(fln) # now this where the problem occurs. n returns the value
m=check_1(fln) # m return a void list
# it should call both m,n & print same length. They work separately but calling at once does'nt work why?
print (len(n))
print(len(m))
But if I run them separately they work as intended. This is a very basic issue, hope somone can clarify me on this basics