Given a list of integers, generate the list of the corresponding floats.
Jump to Post
you can use a list comprehension:
new_list = [float(integral) for integral in old_list]
All 8 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.