No, unless you return the function:
def func1():
def func2():
print("Hello")
return func2
innerfunc = func1()
innerfunc()
or even
func1()()
More Related Contents:
- Print the result obtained from an external window but without opening the window (the selected checkboxes are automatically saved in the database)
- Syntax error on print with Python 3 [duplicate]
- How to search and replace text in a file?
- How to access variables from different classes in tkinter?
- Converting int to bytes in Python 3
- multiprocessing: Understanding logic behind `chunksize`
- Error: ” ‘dict’ object has no attribute ‘iteritems’ “
- How to use filter, map, and reduce in Python 3
- Python Script returns unintended “None” after execution of a function [duplicate]
- How to run pip of different version of python using python command?
- Let JSON object accept bytes or let urlopen output strings
- TypeError: ‘range’ object does not support item assignment
- Is it bad practice to use a built-in function name as an attribute or method identifier?
- builtins.TypeError: must be str, not bytes
- How to print a list with integers without the brackets, commas and no quotes? [duplicate]
- python tkinter return value from function used in command
- Safely evaluate simple string equation
- How to print like printf in Python3?
- Is there anything faster than dict()?
- Python print statement “Syntax Error: invalid syntax” [duplicate]
- How to parallelize file downloads?
- Set up Python simpleHTTPserver on Windows [duplicate]
- Error in Python script “Expected 2D array, got 1D array instead:”?
- Difference between AbstractUser and AbstractBaseUser in Django?
- requests.get returns 403 while the same url works in browser
- Pandas ParserError EOF character when reading multiple csv files to HDF5
- What does colon at assignment for list[:] = […] do in Python [duplicate]
- return value from one python script to another
- What are assignment expressions (using the “walrus” or “:=” operator)? Why was this syntax added?
- bash: Python import – Command not found for pandas