Python Forum
Transactions between the list on python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Transactions between the list on python
#1
Hello everyone ,

I need a small help on python.
I have a list like a=[1 2 3 4 5 ]
I need to obtain abother list by summing second and third index and making third index equal to 0 which is
a=[1 5 0 4 5]
So far there is no problem.
The problem when it is needed in the following parts of the code, i must go back to the original list which is a=[1 2 3 4 5];
but since I did a[2]=0 (to make third index equal to zero), I can not go back to original list. I guess I should save the original list somehow but even when I save , when I said make a[2]=0 , saving list also changes .
Can you help me, how can I achieve this task , please ? Wall how can I turn original list , or call original list when I need ?
Thank you
Reply


Messages In This Thread
Transactions between the list on python - by juniorcoder - Aug-10-2018, 04:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Finding the price based on industry and number of transactions chandramouliarun 1 1,798 Jun-04-2024, 06:57 PM
Last Post: marythodge4
  Generating accounting transactions data Emekadavid 0 945 Sep-22-2023, 09:00 AM
Last Post: Emekadavid

Forum Jump:

User Panel Messages

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