I am currently trying to make a program that converts the elements in a string list into a float list. Though a few adjustments have to be made.
The user enters a "colon" between each typed number, which will then divide the elements in the list. (This works atm)
Every value has to be outputted in 1 decimal, which I have been trying to do with:
print(f'{word:.1f}')
But haven't been able to do it correctly.
Input: 5:2:4
Output: [5.0, 2.0, 4.0]
Would appreciate some recommendations.
user_list = input("Enter values:")
word = user_list.split(":")
print(word)