[Tutor] position of an element in list:

2010-07-23 Thread Vineeth Rakesh
Hello all, How to return the position of a character in a string. Say I have str1 = "welcome to the world" if i want to return the position of the first occurrence of "o" how to do it? Thanks Vin ___ Tutor maillist - Tutor@python.org To unsubscribe or

[Tutor] Help execution time calculation:

2010-07-14 Thread Vineeth Rakesh
Hello all, I want to calculate the execution time of a program. Say I have a function like below: def RepAdd(i): j = 0 while(j___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listi

[Tutor] Help return a pattern from list

2010-07-05 Thread Vineeth Rakesh
Hello all, Can some one help me to return a special pattern from a list. say list = ["something1.mp3","something2.mp3","something4.pdf","something5.odt"] now say I just need to return the files with .mp3 extension. How to go about doing this? Thanks Vin _