Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Beginners Tutorial for Regular Expressions in Python | Python Learning

$
0
0

@GirishHN wrote:

The above article helps the beginners to scale up in python. I thank the author for this amazing piece of work. Also I have a doubt with respect to problem 2 under Some Examples of Regular Expressions

Please compare the below codes:

  1. Code given in the article

result=re.findall(r’\b\w.’,‘AV is largest Analytics community of India’)
print result

Output: [‘AV’, ‘is’, ‘la’, ‘An’, ‘co’, ‘of’, ‘In’]

  1. Code modified by me

result=re.findall(’\b\w.’,‘AV is largest Analytics community of India’)
print result

Output: []

Currently I run the code in Jupyter

When I removed “r” from the actual code the output was a blank list. Can you please help me understand the scenario??

Thanks in advance and appreciate your help!!

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles