Plotting Lists In Python Hackerrank Solution