I have created the following variable, which captures the function from a Point object I created:
j = i.getfunction()
print(j)
The print(j)
outputs something like this whenever it's called:
<function draw_H at 0x1057ce268>
What I want to do is find out if the item attached to the variable contains certain words. For instance, using the print(j)
output above, I want to find out if j
contains draw_H
, like so:
if j contains draw_H:
# Run this code
How would I do this? Specifically, how would I find out if an item attached to a variable contains a certain word? Any help is greatly appreciated!