I want to replace a number in this 2d array if the username already exists.
[["bob man", "0"], ["bill kill", "5"], ["nick", "5"]]
For example, when I receive the username "bob man", with the new number 44. I want to search my array and check if this username exists, and replace the number. If it doesn't exist, I want to append it to the array.
[["bob man", "44"], ["bill kill", "5"], ["nick", "5"]]
Is there a better way of storing this? I am new to python, and simple stuff like this seems much more complex than in js etc. Objects?