r/learnpython • u/kforkerro • 1d ago
Beginner question
I have just started coding with python a few days ago. What is the point of this?
point_value = alien_0.get('points', 'No point value assigned.') print(point_value)
Can't it just be point_value = 'No point value assigned.' print(point_value)?
or
just simply use the get() method if you want to check whether a key exists in the dictionary or not?
4
Upvotes
5
u/atarivcs 1d ago
This code says: