Question: How can I get function name by using another py file? The function reads the file, identifies functions that are not immediately preceded by a
How can I get function name by using another py file?
The function reads the file, identifies functions that are not immediately preceded by a comment and returns a list of their name (represented as strings).
any line that begins with def, followed by a space, is the beginning of a function definition. Also, assume that, when the function has a comment, the comment character, #, will be the first character on the previous line.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
