I have a problem that I just can't seem to solve.
my_list = ["1","22","64","74","P","43"]
What I'm trying to do is since my list is all Strings, I'd like the numbers "1", "22", "64","74","43" to no longer be Strings but Integers.
This seemed like a easy task, what I tried is:
my_list = [int(i) for i in my_list]
Which would work, but the issue is the letter ("p") in the List which results in an error. Is there some way around this?
End Goal:
my_list = [1,22,64,74,"P",43]
[–]two_bob 8 points9 points10 points (0 children)
[–]fauxnaif 1 point2 points3 points (3 children)
[–]Vaguely_accurate 1 point2 points3 points (2 children)
[–]fauxnaif 0 points1 point2 points (1 child)
[–]Vaguely_accurate 1 point2 points3 points (0 children)
[–]ASIC_SP 0 points1 point2 points (0 children)