I've been racking my brain for a few days now. I'm fairly new to Python and trying to figure out how to split a string and output the desired contents to a list. I'm trying to select an entire number (regardless of the number of digits in the number) from a string and store it in a variable for future use. My list of strings will look something like this:
["<foo>1</foo>", "<foo>2</foo>", "<foo>3</foo>", "<foo>4</foo>", "<foo>5</foo>", "<foo>6</foo>", "<foo>7</foo>", "<foo>8</foo>", "<foo>9</foo>", "<foo>10</foo>"]
I'm fairly familiar with for loops and the basic concepts of python, but not sure if I've bitten off more than I can chew.
EDIT: I do already have the list in my script. The challenge is to drop the characters surrounding the numbers, leaving only the numbers in the list.