Help Needed : script weird result.

Dan Sommers 2QdxY4RzWzUUiLuE at potatochowder.com
Sat Sep 1 13:27:44 EDT 2018


On 9/1/18 1:11 PM, mohan4h at gmail.com wrote:
> All,
> 
> I m trying to run this small script to find the lowest of the given array of numbers. The script works fine for various combination of inputs but fails in a weird way for a particular set of inputs, can anyone point the mistake in the script and the behavior.
> 
> Script
> 
> x = input ("Enter the numbers separated by space and press ENTER :")

Think about what x is here, and what x.split does.

> x = x.split(" ")

Now think about what x is again, and recall that Python is strongly typed.

Dan



More information about the Python-list mailing list