Usage of dictionary/arrays
I need help on the below code:
In the libary function, declaring as below:
def test_details(
details={
"test1": {
"test2": {
for ip, list in test_details.
if option in list: return ip
In the main function,declaring only 'option' variable as:
option =" test1"
t=lib.test_
print(t)
when i am running the above code, it is giving as error as "ip is not declared".
But i don't want to decalre 'ip' as individually again, whereever i want 'ip' value then it should check above list respective with option(test1 or test2) and it should print the value directly .
Similarly i want to type only string value but not ip value in some places ?
Thank you,
Sudha.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Sudha
- Solved:
- Last query:
- Last reply: