Getting a number out of a string

2005-09-27 Thread ssmith579
I'm trying to extract single digit number from a string. t[1] = '06897' I want to get the 7, 9,8 6 seperated out to use but can't find a way to split out the single characters. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a number out of a string

2005-09-27 Thread ssmith579
Thanks all! This is just what I needed. -- http://mail.python.org/mailman/listinfo/python-list

Get number of lines in file

2005-05-27 Thread ssmith579
I have read in a file and need to get the number of lines. cpn_file = open('Central Part number list.txt') cpn_version = cpn_file.read().split('\n') I want to know the number of elements in cpn_version. -- http://mail.python.org/mailman/listinfo/python-list

Re: Get number of lines in file

2005-05-27 Thread ssmith579
Thanks! I was trying len(cpn_version) and that didn't work. -- http://mail.python.org/mailman/listinfo/python-list