cows = ["aaa","aab","aac","aad","aae","aaf","aag","aah","aai"]
h = ["aaa","aab","aac","aad","aae","aaf","aag","aah","aai"]
test1 = []
day1 = []
day2 = []
day3 = []
day4 = []
day5 = []
day6 = []
day7 = []
aaa = []
days = ["Day 1", "Day 2", "Day 3", "Day 4", "Day 5", "Day 6", "Day 7"]
w = ["Day 1", "Day 2", "Day 3", "Day 4", "Day 5", "Day 6", "Day 7"]
print("Here are your cows :")
print(h)
print("You will need to input the total liters the cow has milked during the day starting from cow aaa to aai.")
for x in range(7):
print(days[0], end = " ")
days.pop(0)
cows = h[0:9]
for x in range(9):
print("Cow : ", cows[0])
test1.append(float(input("How many liters did you milk the cow? ")))
cows.pop(0)
aaa = test1
for x in range(8):
aaa.pop(1)
for x in range(8):
aaa.pop(2)
for x in range(8):
aaa.pop(3)
for x in range(8):
aaa.pop(4)
for x in range(8):
aaa.pop(5)
for x in range(8):
aaa.pop(6)
for x in range(8):
aaa.pop(7)
When the code is ran and all the data is input. I try and check the lists
>>> aaa
[20.0, 1.0, 20.0, 20.0, 20.0, 20.0, 20.0]
But then when I type in test1 this happens.
>>> test1
[20.0, 1.0, 20.0, 20.0, 20.0, 20.0, 20.0]
Am I doing something wrong with the lists? I can copy the list test1 into another list "in this case aaa" but then when I try to remove parts of the list from aaa it removes it from test1 also!