prices = [100, 200, 150, 200, 100]
prices_with_tax = []
for price in prices:
if price != 200:
prices_with_tax.append(price * 1.1)
prices_with_tax = [price * 1.1 for price in prices if price != 200]
print(prices_with_tax)
prices = [100, 200, 150, 200, 100]
prices_with_tax = [price * 1.1 for price in prices if price != 200]
print(prices_with_tax)
prices = [100, 200, 150, 200, 100]
prices_with_tax = [price * 1.1 for price in prices]
print(prices_with_tax)
prices = [100,200,150,200,100]
for price in prices:
print(price * 1.1)
for index, price in enumerate(prices):
print(f”{index}: {price * 1.1:.2f}”)
nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
sliced_list = nums[::-1]
print(nums)
print(sliced_list)
nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
nums[3:] = []
print(nums)
scores = [10, 20, 30, 20, 40]
scores_sorted = sorted(scores, reverse=True)
print(scores)
print(scores_sorted)
scores = [10, 20, 30, 20, 40]
print(20 in scores)
print(100 in scores)
scores = [10, 20, 30, 20, 40]
del scores[2]
print(scores)
scores = [10, 20, 30, 20, 40]
scores.insert(1, 15)
print(scores)
scores = [10, 20, 30, 20, 40]
scores.append(60) #メソッド
print(scores)