KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Groovy has a nice operator for safe dereferencing, which helps to avoid NullPointerExceptions: variable?.method() The method will only be called, if variable is not null . Is there a way to do the same in Python? Or do I have to write if variable: variable.method() ?
Tags (comma-separated)
Save Edits
Cancel