#Loop through the prices in levelsList.
#During each loop:
#-Create a variable called priceLevelLabel consisting of the text 'Price Level: 'followed
# by the price.
#-Add priceLevelLabel and the price as two separate items to a new list (the sub-List).
#-Append the sub-List to displayList.
for price in self.levelsList:
1
Expert's answer
2021-09-22T23:45:23-0400
levelsList=[1000,2000,3000,4000,5000,6000]
sub_List=[]
for i in levelsList:
priceLevelLabel='Price Level: '+str(i)
sub_List.append(priceLevelLabel)
sub_List.append(i)
print(sub_List)
Comments
Leave a comment