hello guys, when i run this code i can only change 1 item in the list, but i want to repeat the code untill all the three items in the list are changed to items bigger then len() 3, but i cant figure out how to do that. is it even possible? like, i want to get something like this: ['heey', 'whatsupp', 'ineadtolearnthis']
so actually my question is: can i change every string in my list step by step with using a while loop? everytime i press enter that it will change one string and then press enter again i can input another string untill every string is longer then len()3?
i want to say sorry for my english as it is not my first language, i want to thank you guys for reading
so actually my question is: can i change every string in my list step by step with using a while loop? everytime i press enter that it will change one string and then press enter again i can input another string untill every string is longer then len()3?
i want to say sorry for my english as it is not my first language, i want to thank you guys for reading

import random list = ['1', '2', '3'] x = random.choice(list) for index, character in enumerate(list): if character == x: if len(character) < 3: list[index] = input('enter something: ') while len(list) < 3: list[index] = input('enter something: ') print(list)result:
Output:enter something: heey
['heey', '2', '3']
buran write Oct-24-2020, 11:38 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.