tomtetlaw -1
Posting Pro
Recommended Answers
Jump to PostIf I understand you correctly, you probably want something like
if x is None: print "x has no value"
Jump to PostFirst of all python has no variables. Here's how to check if a name is defined in local namespace:
"name" in locals()
and global namespace:
"name" in globals()
All 5 Replies
AceofSpades19 51
Junior Poster in Training
tomtetlaw -1
Posting Pro
scru 909
Posting Virtuoso Featured Poster
tomtetlaw -1
Posting Pro
sneekula 969
Nearly a Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.