RE: file I/O and arithmetic calculation

Discussion in 'Python' started by Carlos Nepomuceno, May 23, 2013.

  1. ----------------------------------------
    > From:

    [...]
    >
    > Do you find this code easy to read? I wouldn't write something like
    > this and I certainly wouldn't use it when explaining something to a
    > beginner.
    >
    > Rather than repeated list comprehensions you should consider using a
    > single loop e.g.:
    >
    > for filename in filenames:
    > # process each file
    >
    > This will make the code a lot simpler.
    >
    >
    > Oscar


    Indeed, but for that you can use Pascal.

    List comprehensions it's what Python does best!

    The code is pretty obvious to me, I mean there's no obfuscation at all.
    Carlos Nepomuceno, May 23, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Keira Wilson

    file I/O and arithmetic calculation

    Keira Wilson, May 22, 2013, in forum: Python
    Replies:
    2
    Views:
    119
    Carlos Nepomuceno
    May 23, 2013
  2. Mark Lawrence

    Re: file I/O and arithmetic calculation

    Mark Lawrence, May 22, 2013, in forum: Python
    Replies:
    0
    Views:
    101
    Mark Lawrence
    May 22, 2013
  3. Carlos Nepomuceno

    RE: file I/O and arithmetic calculation

    Carlos Nepomuceno, May 22, 2013, in forum: Python
    Replies:
    0
    Views:
    106
    Carlos Nepomuceno
    May 22, 2013
  4. Oscar Benjamin

    Re: file I/O and arithmetic calculation

    Oscar Benjamin, May 23, 2013, in forum: Python
    Replies:
    0
    Views:
    118
    Oscar Benjamin
    May 23, 2013
  5. Carlos Nepomuceno

    RE: file I/O and arithmetic calculation

    Carlos Nepomuceno, May 23, 2013, in forum: Python
    Replies:
    0
    Views:
    98
    Carlos Nepomuceno
    May 23, 2013
Loading...

Share This Page