Python Forum
Organizing the output of 2 for loops
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Organizing the output of 2 for loops
#7
(May-20-2018, 10:15 AM)killerrex Wrote:
record = (obj, viewdata(rawvalue)[0][3],viewdata(rawvalue)[0][0], viewdata(rawvalue)[0][1], viewdata(rawvalue)[0][2],rawvalue)
io.append(record)

Since viewdata(rawvalue)[0] is referenced 4 times, placing it into a variable seems like a good idea
view_values = viewdata(rawvalue)[0]
Test everything in a Python shell (iPython, Azure Notebook, etc.)
  • Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
  • Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
  • You posted a claim that something you did not test works? Be prepared to eat your hat.
Reply


Messages In This Thread
Organizing the output of 2 for loops - by pythoneer - May-19-2018, 04:53 AM
RE: Organizing the output of 2 for loops - by volcano63 - May-20-2018, 10:23 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020