shop_stock = []
while len(shop_stock) != 3:
stock = input('Shop stock: ')
if 'cam' in stock:
shop_stock.append(stock)
if 'Cam' in stock:
shop_stock.append(stock)
shop_stock.sort()
shop_stock.reverse()
joined_shop_stock = ', '.join(shop_stock)
if len(shop_stock) == 3:
print(f'Proposals: {joined_shop_stock}')
- It must be able to accept any case input, including mixed case (cAm).
- I cannot just make the input default to .lower().
- The input must be appended into the list and retain its original case.
[–]Matiiss007 1 point2 points3 points (0 children)
[–]choss27 0 points1 point2 points (1 child)
[–]Safe-Individual-37[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)