Update practice.py

Updated the code to take into account a length of zero array version the None(Null) value