For example, there is a list:
lst = [[1, 0], [0, 0, 2]] How to replace all zeros to become:
lst = [[1, 1], [1, 1, 2]] For example, there is a list:
lst = [[1, 0], [0, 0, 2]] How to replace all zeros to become:
lst = [[1, 1], [1, 1, 2]] Source: https://ru.stackoverflow.com/questions/592892/
All Articles