Jun-18-2020, 02:22 AM
OK, I'm really new to python. I've only been learning for about two weeks now. I'm taking an online class to learn but I'm having a lot of trouble with one assignment. I'm coming here because I think it might be something other than y code because its really simple and I have even seen people successfully compile pretty much the exact same code.So im trying to find all the numbers in the string bellow using the re.findall() "function". I think my code works but every time I upload it regardless of any changes I make the output always comes back as 'None'. I don't know what to do and its been 2 days. Help please.
import re y = 'We four guys, live at 2nd street of Malibeu. I had a cash of $248 in my pocket. I got a ticket with serial number 88796451-52.' x = re.findall('[a-z]', y) print(x)And the output is just None not even a compiling error it just prints None