Python Forum
re.findall HELP!!! only returns None
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
re.findall HELP!!! only returns None
#10
(Jun-19-2020, 12:24 AM)Rusty Wrote: if someone could try running it on heir setup that would be great.

We did. @pyzyx3qwerty show the result already in post#2. Here again (just the string is shorter):

>>> import re
>>> y = 'We four guys, live at 2nd street of Malibeu'
>>> x = re.findall('[a-z]', y)
>>> print(x)
['e', 'f', 'o', 'u', 'r', 'g', 'u', 'y', 's', 'l', 'i', 'v', 'e', 'a', 't', 'n', 'd', 's', 't', 'r', 'e', 'e', 't', 'o', 'f', 'a', 'l', 'i', 'b', 'e', 'u']
As @deabhystad explained we suspect you have slightly different code and print None returned from a function. Especially because you mention function in your original post
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
re.findall HELP!!! only returns None - by Rusty - Jun-18-2020, 02:22 AM
RE: re.findall HELP!!! only returns None - by Rusty - Jun-18-2020, 02:42 AM
RE: re.findall HELP!!! only returns None - by buran - Jun-18-2020, 03:13 AM
RE: re.findall HELP!!! only returns None - by Rusty - Jun-18-2020, 05:09 PM
RE: re.findall HELP!!! only returns None - by buran - Jun-18-2020, 07:16 PM
RE: re.findall HELP!!! only returns None - by Rusty - Jun-19-2020, 12:24 AM
RE: re.findall HELP!!! only returns None - by buran - Jun-19-2020, 03:30 AM
RE: re.findall HELP!!! only returns None - by Rusty - Jun-20-2020, 12:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How returns behave in a function with multiple returns? khasbay 1 892 May-19-2024, 08:48 AM
Last Post: deanhystad
  regex findall() returning weird result Radical 1 3,307 Oct-15-2023, 08:47 PM
Last Post: snippsat
  Python: re.findall to find multiple instances don't work but search worked Secret 1 2,083 Aug-30-2022, 08:40 PM
Last Post: deanhystad
  regex.findall that won't match anything xiaobai97 1 2,797 Sep-24-2020, 02:02 PM
Last Post: DeaD_EyE
  Regex findall() NewBeie 2 5,596 Jul-10-2020, 12:19 PM
Last Post: DeaD_EyE
  The "FindAll" Error BadWhite 6 7,721 Apr-11-2020, 05:59 PM
Last Post: snippsat
  Beginner question: lxml's findall in an xml namespace aecklers 0 4,144 Jan-22-2020, 10:53 AM
Last Post: aecklers
  Issue with re.findall alinaveed786 8 6,877 Oct-20-2018, 09:28 AM
Last Post: volcano63
  [Regex] Findall returns wrong number of hits Winfried 8 7,680 Aug-23-2018, 02:21 PM
Last Post: Winfried
  Combining the regex into single findall syoung 0 2,997 May-28-2018, 10:11 AM
Last Post: syoung

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020