I want to store a python function which has an input function [eg: a = input("Item number: ")], into a variable.
So when I call that variable, it should initiate the main function stored in it.
I tried to make a sample function:
- Which takes input from a user and returns it.
- Stored that function into a variable, let's say x.
def user_input():
item_number = input("Item number: ")
return item_number
x=user_input()
-Now when I'm calling that variable x, it is returning the value which was given to the function as input.
-What I want is, it should initiate the function stored in it and ask the user for input.