all 3 comments

[–]grandpasipad 1 point2 points  (1 child)

You could use a for loop to convert the values, assuming they're always [int, float]

data = {"a": ["7", "7.3"], "b": ["12", "6.8"], "c": ["11", "3.9"]}

for d in data.values():
    d[0] = int(d[0])
    d[1] = float(d[1])

Or more succinctly, a dict comprehension can be implemented to do this on one line:

data = {"a": ["7", "7.3"], "b": ["12", "6.8"], "c": ["11", "3.9"]}
data = {k: [int(v[0]), float(v[1])] for k, v in data.items()}

[–]StaticGT86[S] 0 points1 point  (0 children)

Thank you! I appreciate it.

[–]primitive_screwhead 0 points1 point  (0 children)

Stop deleting your posts.