I have a text files that I read to a list. This list contains integers and strings.
For example, my list could look like this:
[\"name\", \"test\", \"1\"
The way to convert to integers is to try the conversion and be prepared for it to fail:
for i in range(len(mylist)): try: mylist[i] = int(mylist[i]) except ValueError: pass