24 views
Problem: Hello Kodlogers, Myself is a high school student. I’ve started learning Python programming recently. I am wanting to replace an item in a list python. Let’s say I have a list of integers like: my_list = [10, -15, 1, 8, 0, 9, -5, 13, -1, 5] ... or 1. Negatives values with -1, positive values with 1 and leave 0 untouched. Is it doable? If doable, how? Thanks for your help, mate.
asked
Apr 4, 2020
Gavin
15.3k points