demo_ref_string_isidentifier2.py:
a = "MyFolder" b = "Demo002" c = "2bring" d = "my demo" print(a.isidentifier()) print(b.isidentifier()) print(c.isidentifier()) print(d.isidentifier())
➜ begtut>python demo_string_isidentifier2.py
True
True
False
False