Ask coding questions

← Back to all posts
replit database
51LV3RC0D3R

How do I make it so that the value of my key is like db[key] = [all the previous stuff..., plus something new here]? And also how do I print only 1 value of the db[key] if I have more than 1 value?

Thanks in advance,
51LV3RC0D3R

Answered by CosmicBear [earned 5 cycles]
View Answer
Voters
51LV3RC0D3R
Comments
hotnewtop
CosmicBear
51LV3RC0D3R

@CosmicBear thanks!

51LV3RC0D3R

@CosmicBear, wait how do I keep the same key, but different values?

51LV3RC0D3R

@CosmicBear it says that 'str' object does not support item assignment on data[newKey] = value.