Python Forum
Understanding how reassignment works
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Understanding how reassignment works
#4
Instead of
list4[i] = lut[list4[i]]
you could do
for idx, value in enumerate(lut[list4[i]):
    list4[i][idx] = value
but that would be very inefficient.
Reassigning is imho the better way to do it.
Reply


Messages In This Thread
Understanding how reassignment works - by Shreya10o - May-09-2020, 10:50 AM
RE: Understanding how reassignment works - by ThomasL - May-10-2020, 09:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trouble Understanding Why This Code Works crocolicious 2 2,830 Apr-09-2019, 05:24 PM
Last Post: crocolicious

Forum Jump:

User Panel Messages

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