Re: [Tutor] TypeError: generatePersonID() takes exactly 1 argument (0 given)

2013-11-15 Thread Suhas Bhairav
Hello, In your program, when you're calling generatePersonID(), you need to pass an argument to the function i.e. the value of fullName.This is because when you're defining the function generatePersonID(), it is generatePersonID(fullName) and not just generatePersonID(). So you have pass an argu

Re: [Tutor] (no subject)

2013-03-24 Thread suhas bhairav
Python website provides you a whole set of resources catering to novices. http://docs.python.org/2/tutorial/ Nick Parlante, a Stanford lecturer has created a wonderful tutorial on Python and you can find it in the below link: https://developers.google.com/edu/python/ Google has free videos which

Re: [Tutor] Please Help

2013-03-22 Thread suhas bhairav
Hi Arijit, I have modified your program a bit and it is working fine for me. Values greater than 5 are being printed. Here is the code: f = open ("D:\\digi_2.txt", "r+") lines = f.readlines() number_list = [] for line in lines: print line for number in line.split(','):

Re: [Tutor] Fwd: findall() returns tuples or string?

2013-03-06 Thread suhas bhairav
Hi Alan, As far as my understanding goes, re.findall without using "()" inside your pattern will return you a list of strings when you search something similar to the one shown below: a="Bangalore, India"re.findall("[\w][\n]*",a) Output:- ['B','a','n','g','a','l','o','r','e','I','n','d','i','a']