Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #105183

Beginner Python Help

X-Received by 10.182.75.196 with SMTP id e4mr10632588obw.36.1458284695428; Fri, 18 Mar 2016 00:04:55 -0700 (PDT)
X-Received by 10.50.43.194 with SMTP id y2mr871069igl.9.1458284695353; Fri, 18 Mar 2016 00:04:55 -0700 (PDT)
Path csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!av4no1100217igc.0!news-out.google.com!u9ni481igk.0!nntp.google.com!nt3no2619397igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Fri, 18 Mar 2016 00:04:55 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=122.57.52.63; posting-account=SWwnlwoAAAAefEX_FeQs1IhozBITHlqF
NNTP-Posting-Host 122.57.52.63
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <101edd27-17e1-497c-a60f-fa56b033563b@googlegroups.com> (permalink)
Subject Beginner Python Help
From Alan Gabriel <alanunny@gmail.com>
Injection-Date Fri, 18 Mar 2016 07:04:55 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.python:105183

Show key headers only | View raw


Hey there,

I just started out python and I was doing a activity where im trying to find the max and min of a list of numbers i inputted.

This is my code..

num=input("Enter list of numbers")
list1=(num.split())

maxim= (max(list1))
minim= (min(list1))

print(minim, maxim)



So the problem is that when I enter numbers with an uneven amount of digits (e.g. I enter 400 20 36 85 100) I do not get 400 as the maximum nor 20 as the minimum. What have I done wrong in the code?

Thanks for the help

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Beginner Python Help Alan Gabriel <alanunny@gmail.com> - 2016-03-18 00:04 -0700
  Re: Beginner Python Help Terry Reedy <tjreedy@udel.edu> - 2016-03-18 03:20 -0400
    Re: Beginner Python Help Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-03-18 09:44 +0200
  Re: Beginner Python Help Chris Warrick <kwpolska@gmail.com> - 2016-03-18 08:23 +0100
  Re: Beginner Python Help Ben Finney <ben+python@benfinney.id.au> - 2016-03-18 18:26 +1100
  Re: Beginner Python Help "Martin A. Brown" <martin@linux-ip.net> - 2016-03-18 00:50 -0700

csiph-web