+ 1

How many data types exist in python?

python

23rd Feb 2018, 9:23 PM
Mahlangu Nzunda
Mahlangu Nzunda - avatar
2 ответов
0
Good question, because I've got the following problem: I've got a list of positive and negative floats. Some values are 'False'. I want to know the maximum value of the floats. That's is a problem if all floats are negative, cause for Python False == 0. For example the output of print(max([-1.2, -3.0, False, -5.5])) is 'False' and not -1.2.
23rd Feb 2018, 11:21 PM
Sebastian Keßler
Sebastian Keßler - avatar
0
I think the problem might be that the list you have has text and a float
25th Feb 2018, 2:16 PM
Mahlangu Nzunda
Mahlangu Nzunda - avatar