IndexError? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: IndexError? (/thread-4992.html) |
IndexError? - OmarSinno - Sep-14-2017 import sys a= int(sys.argv[1]) b= int(sys.arv[2]) c= int(sys.argv[3]) inorder = a<b<c or a>b>c print(inorder)Anyone can help me? RE: IndexError? - buran - Sep-14-2017 What do you need help with? Note, you should always post full traceback (if you get one) in error tags... in this case you have misspelled sys.argv on line 3
RE: IndexError? - wavic - Sep-14-2017 Perhaps there are one or two command line arguments and you try to get argv[3] when it does not exist. |