Python Forum
Help With While Loop and Append
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help With While Loop and Append
#11
Ok so numbers, strings, and tuples are immutables, but lists are mutable.

There was this example in link:
nums = [1, 2, 3]
other = nums
nums.append(4)
print(other) ## 1, 2, 3, 4

is there any way where I can transfer only values of nums to other. like only values of one list of numbers to the values of second list of numbers without linkining them. cause I'll be using the main list repeatedly?
Reply


Messages In This Thread
Help With While Loop and Append - by laprus - Jan-30-2019, 11:02 AM
RE: Help With While Loop and Append - by buran - Jan-30-2019, 12:17 PM
RE: Help With While Loop and Append - by laprus - Jan-31-2019, 05:25 AM
RE: Help With While Loop and Append - by perfringo - Jan-31-2019, 06:49 AM
RE: Help With While Loop and Append - by laprus - Feb-03-2019, 09:19 AM
RE: Help With While Loop and Append - by perfringo - Feb-03-2019, 09:53 AM
RE: Help With While Loop and Append - by buran - Feb-03-2019, 09:59 AM
RE: Help With While Loop and Append - by laprus - Feb-05-2019, 05:09 AM
RE: Help With While Loop and Append - by perfringo - Feb-05-2019, 07:13 AM
RE: Help With While Loop and Append - by buran - Feb-05-2019, 07:49 AM
RE: Help With While Loop and Append - by laprus - Feb-06-2019, 05:55 AM
RE: Help With While Loop and Append - by perfringo - Feb-06-2019, 08:01 AM
RE: Help With While Loop and Append - by laprus - Feb-07-2019, 04:58 AM
RE: Help With While Loop and Append - by perfringo - Feb-07-2019, 07:04 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  why is the append function gets empty on the loop?/python rhai 3 3,218 Jul-07-2018, 12:19 PM
Last Post: rhai

Forum Jump:

User Panel Messages

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