Elektrine lite

← Feed

@trbarrettjr@crosstalk.tech

Post #2376552

2026-01-01 16:57 UTC

I noticed something in this last year when I code in python. When attempting to get something from a dictionary instead of doing dict['key'] I am utilizing more dict.get('key'). I think I like that more because it doesn't error, under the dict.get('key') it will just return None if it doesn't exist, or you can set a value if it fails such as dict.get('key', 'value') Weird how some of my coding changes over time. #Python

Replies (0)

No replies.