[Tutor] (no subject)
Luke Paireepinart
rabidpoobear at gmail.com
Thu Oct 28 21:54:37 CEST 2010
This code shouldn't even actually execute, you should get an indexerror exception. Close your IDE and try it again. Should make the issue more clear.
-----------------------------
Sent from a mobile device with a bad e-mail client.
-----------------------------
On Oct 27, 2010, at 1:04 PM, "Terry Green" <tmantjg at yahoo.com> wrote:
> Need Help!]
>
>
>
> def main():
>
> pass
>
>
>
> if __name__ == '__main__':
>
> main()
>
> postPos=words[3]
>
> f = open ("c:/users/terry/downloads/tup1012k/tup1012x.drf","r")
>
> lines = f.readlines()
>
> for line in lines:
>
> words = line.split(",")
>
> print (words[3],postPos)
>
> close = f
>
>
>
> When I run the above script, the field postPos doesn't match the input!
>
> postPost should be the same as words[3]
>
> can't guess why?
>
> any help?
>
>
>
> *** Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32. ***
>
> >>>
>
> 1 3
>
> 2 3
>
> 3 3
>
> >>>
>
>
>
> Terry Green
>
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20101028/aaf0cfb8/attachment.html>
More information about the Tutor
mailing list