Home > other >  Undefined for help: the calling function, the input parameters, how to use the try the except print
Undefined for help: the calling function, the input parameters, how to use the try the except print

Time:11-22

User_list=[[" Account number ", "Currency", "Balance"],
[" 001-987654-003 ", "USD", 1300.72],
[" 001-919202-100 ", "EUR", 105.01],
[" 001-905700-100 ", "EUR", 305.00],
[" 001-908415-307 ", "CHF 20804.98],
[" 011-974777-200 ", "PLN, 208.15],
[" 001-931654-001 ", "USD", 450.7]]

Def vlookup (lookupvalue, lookuplist col_index) :

Try:

Lookuplist=user_list

Except the Exception as e:

Print (STR) (e)

The else:

Length1=len (lookuplist [0])

Length2=len (lookuplist)

For j in range (length2) :

If lookupvalue=https://bbs.csdn.net/topics/=lookuplist [j] [0] :


In the range if col_index - 1 length1) :

Return the print (lookuplist [j] [] col_index - 1)

The else:
Return the print (' Out of the scope)

The else:

The continue

Return the print (' Not found ')



Vlookup (001-919202-100 ", " otheruserlist , 2)

Traceback (the most recent call last) :

The File "C: \ Users \ \ untitled0 Kevin Sun py", line, 59 in
Vlookup (001-919202-100, otheruserlist, 2)

NameError: name 'otheruserlist' is not defined
  • Related