[Python] Can i change a string in a list by using user input in python

Discussão em 'Python' iniciado por Stack, Maio 22, 2025.

  1. Stack

    Stack Membro Participativo

    the code is:

    max_stack_mod = 0

    while True:
    user_input = input()

    if user_input == 'r':
    max_stack_mod -= 1
    max_stack = [0,] * max_stack_mod
    print (max_stack)

    elif user_input == 'a':
    max_stack_mod += 1
    max_stack = [0,] * max_stack_mod
    print (max_stack)

    elif user_input == 'c':
    #here
    user_change = input()
    user_change in range

    Continue reading...

Compartilhe esta Página