cara mendapatkan konten tanda kurung

"""
This will try to split the argument into 2, using the square brackets, then
will split the index one, so, the variable foo just is the content of
any group of characters. like ()[]{}
"""
try:
  foo = arg.split("[")[1].split("]")[0]
except:
# The argument doesn't contain a class.
    pass
Blyxyas