@@ -0,0 +1,9 @@
# dir, hasattr e getattr em Python
string = 'Luiz'
metodo = 'strip'
if hasattr(string, metodo):
print('Existe upper')
print(getattr(string, metodo)())
else:
print('Não existe o método', metodo)
The note is not visible to the blocked user.