Artificial reviews
While checking out the movie reviews in your dataset, you realize that some of them show an atypical pattern. Since you should only include true reviews in your analysis, you decide to extract the suspicious ones that follow this pattern. You want to see if it is possible to artificially create reviews by using the first and last part of one example review and changing a keyword in the middle.
The text of two movie reviews has been already saved in the variables movie1
and movie2
. You can use the print()
function to view the variables in the IPython Shell.
Remember: The 1st character of a string has index 0.
This exercise is part of the course
Regular Expressions in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Select the first 32 characters of movie1
first_part = ____[____]